Skip to content

Conversation

@andygrove
Copy link
Member

Summary

  • Adds native Comet support for Spark next_day function
  • Returns the first date after a given start date that falls on the specified day of week
  • Supports full day names (Sunday, Monday, etc.) and abbreviations (Sun, Mon, etc.)
  • Invalid day names return NULL (matching Spark's non-ANSI mode behavior)

Test Plan

  • Added unit tests in CometTemporalExpressionSuite
  • Tests include all 7 days with full names and abbreviations
  • Tests include literal dates and null handling
  • All existing tests pass

Note: This PR was generated with AI assistance.

Closes #3092

Adds native Comet support for Spark's next_day function which
returns the first date after a given date that falls on the
specified day of the week.

Supports full day names (Sunday, Monday, etc.) and abbreviations
(Sun, Mon, etc.).

Closes apache#3092

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@andygrove andygrove marked this pull request as draft January 14, 2026 23:49
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2026

Codecov Report

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

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3148      +/-   ##
============================================
+ Coverage     56.12%   59.87%   +3.74%     
- Complexity      976     1414     +438     
============================================
  Files           119      168      +49     
  Lines         11743    15587    +3844     
  Branches       2251     2589     +338     
============================================
+ Hits           6591     9332    +2741     
- Misses         4012     4946     +934     
- Partials       1140     1309     +169     

☔ 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 andygrove marked this pull request as ready for review January 15, 2026 03:19
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.

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: next_day

3 participants