-
Notifications
You must be signed in to change notification settings - Fork 284
feat: add support for next_day expression #3148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
Moving this to draft until #3328 is merged |
# Conflicts: # native/spark-expr/src/comet_scalar_funcs.rs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace our custom SparkNextDay with the upstream datafusion-spark version, which also handles LargeUtf8 and Utf8View string types. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Thanks, I have updated to use the implementation from DF now. |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
next_dayfunctionTest Plan
CometTemporalExpressionSuiteCloses #3092