Skip to content

chore: Align sort constraints w/ arrow-rs#2279

Merged
andygrove merged 3 commits intoapache:mainfrom
hsiang-c:relax_sort
Sep 4, 2025
Merged

chore: Align sort constraints w/ arrow-rs#2279
andygrove merged 3 commits intoapache:mainfrom
hsiang-c:relax_sort

Conversation

@hsiang-c
Copy link
Copy Markdown
Contributor

@hsiang-c hsiang-c commented Sep 1, 2025

Which issue does this PR close?

Closes #1854

Rationale for this change

What changes are included in this PR?

  • Add BooleanType for both functions.
  • Add TimestampNTZType to can_rank function.
  • Support sorting MapType on its values
  • Move existing temporal types to a separate case clause
  • Exclude Spark's YearMonthIntervalType and DayTimeIntervalType b/c Comet Spark doesn't support them.
  • Align Comet's canRank/can_sort_to_indices function w/ Arrow's can_rank and can_sort_to_indices

How are these changes tested?

  • Tested by sorting on Array/Map of previous unsupported types
  • Make sure CometSort is in the SparkPlan

@hsiang-c hsiang-c changed the title Relax sort chore: Align sort constraints w/ arrow-rs Sep 2, 2025
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 2, 2025

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #2279      +/-   ##
============================================
+ Coverage     56.12%   57.82%   +1.69%     
- Complexity      976     1291     +315     
============================================
  Files           119      146      +27     
  Lines         11743    13368    +1625     
  Branches       2251     2372     +121     
============================================
+ Hits           6591     7730    +1139     
- Misses         4012     4381     +369     
- Partials       1140     1257     +117     

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

Copy link
Copy Markdown
Member

@andygrove andygrove left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks @hsiang-c

@andygrove andygrove merged commit 7403b7f into apache:main Sep 4, 2025
94 of 96 checks passed
@hsiang-c hsiang-c deleted the relax_sort branch October 16, 2025 21:41
coderfender pushed a commit to coderfender/datafusion-comet that referenced this pull request Dec 13, 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.

Relax sort fallback constraints

3 participants