Skip to content

fix: make sure that RDD iterators return correct type for max, min and sum - #1879

Open
CaiJimmy wants to merge 2 commits into
jimmy/union-type-inferencefrom
jimmy/rdd-aggregate-type
Open

CaiJimmy wants to merge 2 commits into
jimmy/union-type-inferencefrom
jimmy/rdd-aggregate-type

Conversation

@CaiJimmy

@CaiJimmy CaiJimmy commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

RDD-based min(), max() and sum() now type their results the same way as local evaluation. Untyped values are converted to xs:double before aggregating, including when the input has a single item. When the input mixes primitive types (float with double or decimal, or string with xs:anyURI), the result is converted to their common type.

An input of a single primitive type keeps the selected item and its derived type. Local and RDD evaluation share this logic through ExtremumEvaluation.

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

QT3 Test Results - Parser: jsoniq

Regression baseline: run 37529089746

🎉 No regressions found for this build.

✅ Improvement summary: 2 test(s) previously failing, errored, or skipped now pass.

Suite Test file Test case
fn fn/max.xml:fn-max-13
fn fn/min.xml:fn-min-13
Summary of passed tests for jsoniq
Test Suite Passing Failing Errors Skipped Missing features Total
app 2037 27 88 5 5 2157
array 208 0 1 0 0 209
fn 10310 268 170 387 315 11135
map 220 0 0 0 0 220
math 149 0 0 0 0 149
misc 764 34 21 52 18 871
op 4339 4 23 0 0 4366
prod 11473 340 186 208 7 12207
ser 332 11 0 0 0 343
xs 155 0 0 9 0 164
Total 29987 684 489 661 345 31821

Full analysis report: see analysis-jsoniq in artifacts.

Download detailed test results

@github-actions

github-actions Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

QT3 Test Results - Parser: xquery

Regression baseline: run 37529089746

🎉 No regressions found for this build.

✅ Improvement summary: 2 test(s) previously failing, errored, or skipped now pass.

Suite Test file Test case
fn fn/max.xml:fn-max-13
fn fn/min.xml:fn-min-13
Summary of passed tests for xquery
Test Suite Passing Failing Errors Skipped Missing features Total
app 2044 26 82 5 5 2157
array 209 0 0 0 0 209
fn 10332 247 169 387 315 11135
map 220 0 0 0 0 220
math 149 0 0 0 0 149
misc 768 30 21 52 18 871
op 4339 4 23 0 0 4366
prod 11554 292 153 208 7 12207
ser 343 0 0 0 0 343
xs 155 0 0 9 0 164
Total 30113 599 448 661 345 31821

Full analysis report: see analysis-xquery in artifacts.

Download detailed test results

@CaiJimmy
CaiJimmy force-pushed the jimmy/sequence-cardinality branch 3 times, most recently from e621705 to 9a5bb63 Compare October 6, 2026 20:45
@CaiJimmy
CaiJimmy force-pushed the jimmy/rdd-aggregate-type branch from b3b5a79 to f3c3c8c Compare October 6, 2026 20:48
@CaiJimmy
CaiJimmy changed the base branch from jimmy/sequence-cardinality to jimmy/union-type-inference October 6, 2026 20:48
@CaiJimmy
CaiJimmy marked this pull request as ready for review October 6, 2026 20:57
min and max share the promotion code, and inputs with one primitive type
all keep the selected item, so the removed fixtures repeated covered rules.
@CaiJimmy
CaiJimmy force-pushed the jimmy/rdd-aggregate-type branch from 9ae74e9 to c4b6e1e Compare October 6, 2026 23:39
@CaiJimmy
CaiJimmy force-pushed the jimmy/union-type-inference branch from 839cc1c to 863ac6e Compare October 6, 2026 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant