Skip to content

Conversation

@andygrove
Copy link
Member

Summary

  • Adds native Comet support for Spark timestamp_seconds function (also known as seconds_to_timestamp)
  • Converts seconds since Unix epoch to a timestamp
  • Supports Int32, Int64, and Float64 input types

Test Plan

  • Added unit tests in CometTemporalExpressionSuite
  • Tests include random data, literal values, nulls, negative values (before epoch), and fractional seconds
  • All existing tests pass

Note: This PR was generated with AI assistance.

Closes #3111

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 <[email protected]>
@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 (bbfd11e).
⚠️ Report is 848 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3146      +/-   ##
============================================
+ Coverage     56.12%   59.87%   +3.74%     
- Complexity      976     1414     +438     
============================================
  Files           119      168      +49     
  Lines         11743    15588    +3845     
  Branches       2251     2589     +338     
============================================
+ Hits           6591     9333    +2742     
- 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:41
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: seconds_to_timestamp

2 participants