Skip to content

Conversation

rishvin
Copy link
Contributor

@rishvin rishvin commented Aug 29, 2025

Which issue does this PR close?

Addresses Part of #1941

Rationale for this change

Introduces map_sort which is spark compatible MapSort function. Spark MapSort was introduced in Spark-4.0 to allows grouping on Map type. It allows this by sorting the map by keys before doing the group by.

This PR has been split from original PR #2221. Please see that for details.

What changes are included in this PR?

A new map_sort physical function.

How are these changes tested?

Added unit tests.

@rishvin
Copy link
Contributor Author

rishvin commented Aug 29, 2025

@comphead / @andygrove I have split the first part from MapSort PR now. Could you please review this.

@rishvin rishvin changed the title chore: [Part1]: Introduce scalar function chore: [Part1]: Introduce map-sort scalar function Aug 29, 2025
return Err(DataFusionError::Internal(format!(
"Unsupported operation: {:?}",
op
"Unsupported operation: {op:?}"
Copy link
Contributor Author

@rishvin rishvin Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not related to this PR. Clippy fix made this change.

@codecov-commenter
Copy link

codecov-commenter commented Aug 29, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 57.78%. Comparing base (f09f8af) to head (2dad05f).
⚠️ Report is 434 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2262      +/-   ##
============================================
+ Coverage     56.12%   57.78%   +1.65%     
- Complexity      976     1291     +315     
============================================
  Files           119      145      +26     
  Lines         11743    13360    +1617     
  Branches       2251     2378     +127     
============================================
+ Hits           6591     7720    +1129     
- Misses         4012     4384     +372     
- Partials       1140     1256     +116     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rishvin rishvin force-pushed the 1941-part1-introduce-map-sort-function branch from 3c4ecbb to 2dad05f Compare August 30, 2025 03:29
@rishvin rishvin changed the title chore: [Part1]: Introduce map-sort scalar function chore: [1941-Part1]: Introduce map-sort scalar function Aug 30, 2025
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rishvin starting the CI

@rishvin rishvin changed the title chore: [1941-Part1]: Introduce map-sort scalar function feat: [1941-Part1]: Introduce map-sort scalar function Sep 7, 2025
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @rishvin

@comphead comphead merged commit f2baf95 into apache:main Sep 9, 2025
96 checks passed
@rishvin rishvin deleted the 1941-part1-introduce-map-sort-function branch September 9, 2025 19:21
comphead added a commit to comphead/arrow-datafusion-comet that referenced this pull request Sep 11, 2025
mbutrovich pushed a commit that referenced this pull request Sep 11, 2025
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.

3 participants