fix: compare ScalarValue maps using Arrow ordering - #25555
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25555 +/- ##
==========================================
+ Coverage 82.38% 82.41% +0.03%
==========================================
Files 1138 1138
Lines 434313 435420 +1107
Branches 434313 435420 +1107
==========================================
+ Hits 357805 358872 +1067
+ Misses 54876 54845 -31
- Partials 21632 21703 +71 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kumarUjjawal
approved these changes
Sep 21, 2026
kumarUjjawal
left a comment
Contributor
There was a problem hiding this comment.
Thank you @viirya
Looks good 👍
Member
Author
|
Thank you @kumarUjjawal ! |
github-merge-queue
Bot
removed this pull request from the merge queue due to no response for status checks
Sep 21, 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.
Which issue does this PR close?
Close #25556
Rationale for this change
ScalarValue::partial_cmponly compared Map keys and ignored their values. Maps with identical keys but different values were therefore considered equal.This could produce incorrect ordering when merging ordered aggregate states, such as
first_value,last_value, andnth_value, and could incorrectly validate range partition split points.What changes are included in this PR?
Use Arrow's Map comparator for
ScalarValue::Mapcomparisons. This aligns scalar comparison with Arrow sorting and nested comparison semantics, including values, entry order, lengths, and nulls.Add unit tests covering these cases.
What is the testing strategy for this PR?
Added
test_map_partial_cmpcovering:(key, value)entry orderingAre there any user-facing changes?
Map scalar comparisons now consider both keys and values and are consistent with Arrow ordering.