Repository navigation
Fix read-in-order skipping the sort for Decimal/DateTime64 compared with a float, arrays without a common type and Tuple(Dynamic) compared with a string - #126019
Merged
Conversation
Contributor
|
Workflow [PR], commit [b5a3715] Summary: ✅
AI ReviewSummaryPR #126019 prevents read-in-order optimizations from treating an expression as fixed when Missing context / blind spots
Final VerdictStatus: ✅ Approve. No inline findings. Runtime CI results remain pending. |
yariks5s
approved these changes
Oct 16, 2026
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #125179
Closes: #125535
Related: #123677
Related: #125378
Read-in-order treated a column as fixed when
equalscan match several values that sort differently:Decimal/DateTime64/Time64wider thanDecimal32vs a float (compared inFloat64), arrays without a common type (compared element by element), and aTuplewithVariant/Dynamicvs a string literal (parsed into the tuple type, whoseVariant/Dynamicelements compare across stored types).equalsMatchesSeveralValuesnow detects these, so such queries sort the matching rows. Tests are added to05321_read_in_order_string_vs_fixed_string_constant.Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Fixed unsorted or wrongly grouped results of
ORDER BY,LIMIT BYandGROUP BYin order when aDecimalorDateTime64column is compared with a float, anArraycolumn with an array of an incompatible type, or aTuplecolumn with aVariant/Dynamicelement with a string literal.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/126019]
Version info
26.11.1.74-master(included in26.11and later)