Skip to content

Conversation

@andygrove
Copy link
Member

Summary

  • Adds native Comet support for Spark's last_day function
  • Returns the last day of the month for a given date
  • Uses the SparkLastDay implementation from the datafusion-spark crate

Test Plan

  • Added unit tests with random dates
  • Added tests for literal dates across various months
  • Added tests for leap year handling (February 2024 vs 2023)
  • Added test for null handling
  • Verified all existing tests pass

Note: This PR was generated with AI assistance.

Closes #3090

@codecov-commenter
Copy link

codecov-commenter commented Jan 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.04%. Comparing base (f09f8af) to head (399aa84).
⚠️ Report is 861 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #3143      +/-   ##
============================================
+ Coverage     56.12%   60.04%   +3.92%     
- Complexity      976     1429     +453     
============================================
  Files           119      170      +51     
  Lines         11743    15774    +4031     
  Branches       2251     2606     +355     
============================================
+ Hits           6591     9472    +2881     
- Misses         4012     4981     +969     
- Partials       1140     1321     +181     

☔ 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.

Adds native Comet support for Spark's last_day function, which returns
the last day of the month for a given date.

Uses the SparkLastDay implementation from datafusion-spark crate.

Closes apache#3090

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@andygrove andygrove marked this pull request as draft January 14, 2026 23:49
@andygrove andygrove marked this pull request as ready for review January 15, 2026 00:17
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.

Thanks @andygrove

@andygrove andygrove merged commit 0041bc5 into apache:main Jan 21, 2026
119 checks passed
@andygrove andygrove deleted the feature/last_day branch January 21, 2026 05:58
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: last_day

3 participants