Skip to content

feat: Support map sort expression#3210

Closed
Shekharrajak wants to merge 11 commits intoapache:mainfrom
Shekharrajak:feature/support-map-sort-expression
Closed

feat: Support map sort expression#3210
Shekharrajak wants to merge 11 commits intoapache:mainfrom
Shekharrajak:feature/support-map-sort-expression

Conversation

@Shekharrajak
Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #3171

Rationale for this change

Implement native execution support for Apache Spark's map_sort expression, enabling efficient sorting of map entries by keys in ascending order within Comet's native execution engine.

What changes are included in this PR?

How are these changes tested?

  • spark/src/test/scala/org/apache/comet/CometMapExpressionSuite.scala

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 4, 2026

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3210      +/-   ##
============================================
- Coverage     56.12%   54.90%   -1.23%     
- Complexity      976     1432     +456     
============================================
  Files           119      175      +56     
  Lines         11743    16165    +4422     
  Branches       2251     2681     +430     
============================================
+ Hits           6591     8875    +2284     
- Misses         4012     6017    +2005     
- Partials       1140     1273     +133     

☔ 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.

@andygrove
Copy link
Copy Markdown
Member

Tests are failing:

2026-02-04T15:22:31.2961409Z - map_sort with integer keys *** FAILED *** (138 milliseconds)
2026-02-04T15:22:31.2962737Z   org.apache.spark.sql.AnalysisException: [UNRESOLVED_ROUTINE] Cannot resolve function `map_sort` on search path [`system`.`builtin`, `system`.`session`, `spark_catalog`.`default`].; line 1 pos 7
2026-02-04T15:22:31.2963943Z   at org.apache.spark.sql.errors.QueryCompilationErrors$.unreso

@Shekharrajak I'll move this to draft for now. Please mark as ready to review once the test failures ares resolved.

@andygrove andygrove marked this pull request as draft February 4, 2026 15:45
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 6, 2026

Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.

@github-actions github-actions Bot added the Stale label Apr 6, 2026
@Shekharrajak Shekharrajak force-pushed the feature/support-map-sort-expression branch from a8d79fb to e050c4f Compare April 6, 2026 11:16
@Shekharrajak
Copy link
Copy Markdown
Contributor Author

Tests are failing:

Not it is looking good . Please triggger CI checks .

@Shekharrajak Shekharrajak marked this pull request as ready for review April 6, 2026 11:45
@github-actions github-actions Bot removed the Stale label Apr 7, 2026
@andygrove
Copy link
Copy Markdown
Member

Replaced with #4076

Thanks @Shekharrajak

@andygrove andygrove closed this Apr 25, 2026
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.

[Feature] Support Spark expression: map_sort

3 participants