feat: add support for timestamp_seconds expression#3146
Open
andygrove wants to merge 5 commits intoapache:mainfrom
Open
feat: add support for timestamp_seconds expression#3146andygrove wants to merge 5 commits intoapache:mainfrom
andygrove wants to merge 5 commits intoapache:mainfrom
Conversation
Adds native Comet support for Spark's timestamp_seconds (SecondsToTimestamp) function, which converts seconds since Unix epoch to a timestamp. Supports Int32, Int64, and Float64 inputs. NaN and Infinite float values return null per Spark behavior. Closes apache#3111 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 #3146 +/- ##
============================================
+ Coverage 56.12% 59.96% +3.83%
- Complexity 976 1473 +497
============================================
Files 119 175 +56
Lines 11743 16170 +4427
Branches 2251 2682 +431
============================================
+ Hits 6591 9696 +3105
- Misses 4012 5126 +1114
- Partials 1140 1348 +208 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…mestamp # 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 |
…mestamp # Conflicts: # native/spark-expr/src/comet_scalar_funcs.rs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
timestamp_secondsfunction (also known asseconds_to_timestamp)Test Plan
CometTemporalExpressionSuiteCloses #3111