feat: add support for next_day expression#3148
Draft
andygrove wants to merge 3 commits intoapache:mainfrom
Draft
feat: add support for next_day expression#3148andygrove wants to merge 3 commits intoapache:mainfrom
andygrove wants to merge 3 commits intoapache:mainfrom
Conversation
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>
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
comphead
reviewed
Jan 16, 2026
Contributor
comphead
left a comment
There was a problem hiding this comment.
Can we use next_day from DataFusion? https://github.com/apache/datafusion/blob/main/datafusion/spark/src/function/datetime/next_day.rs
# Conflicts: # docs/source/user-guide/latest/configs.md # native/spark-expr/src/comet_scalar_funcs.rs # native/spark-expr/src/lib.rs # spark/src/main/scala/org/apache/comet/serde/datetime.scala # spark/src/test/scala/org/apache/comet/CometTemporalExpressionSuite.scala
Member
Author
|
Moving this to draft until #3328 is merged |
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.
Summary
next_dayfunctionTest Plan
CometTemporalExpressionSuiteCloses #3092