Skip to content

Add missing datetime functions#1467

Open
timsaucer wants to merge 2 commits intoapache:mainfrom
timsaucer:feat/missing-datetime-functions
Open

Add missing datetime functions#1467
timsaucer wants to merge 2 commits intoapache:mainfrom
timsaucer:feat/missing-datetime-functions

Conversation

@timsaucer
Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #1451

Rationale for this change

Adds missing functions

What changes are included in this PR?

Expose rust code.
Add python wrapper.
Add unit tests.

Are there any user-facing changes?

New addition only

timsaucer and others added 2 commits March 30, 2026 13:01
…rmat

Closes apache#1451. Adds make_time Rust binding and Python wrapper, and adds
current_timestamp (alias for now) and date_format (alias for to_char)
Python functions.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@timsaucer timsaucer marked this pull request as ready for review March 30, 2026 19:45
@timsaucer timsaucer requested a review from Copilot March 30, 2026 19:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Python-level exposure for missing DataFusion date/time functions requested in #1451, including Rust bindings where needed.

Changes:

  • Exposed make_time through the Rust functions module and registered it for Python.
  • Added Python wrappers for current_timestamp (alias of now) and date_format (alias of to_char), plus a new make_time wrapper.
  • Added unit tests covering the new aliases and make_time behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
python/tests/test_functions.py Adds tests validating current_timestamp/date_format aliases and make_time output.
python/datafusion/functions.py Exposes current_timestamp, date_format, and make_time in the public functions API.
crates/core/src/functions.rs Adds Rust-side make_time expression binding and registers it in the Python module init.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

Add missing date/time functions (current_timestamp, date_format, make_time)

2 participants