Skip to content

Navigation Menu

Sign in
Sign up

[AURON #2509] Support date_add and date_sub functions natively - #2512

Open
Sigma-Ma wants to merge 1 commit into
apache:master from
Sigma-Ma:Auron-2509-implement-native-date-add-and-date-sub
Open

[AURON #2509] Support date_add and date_sub functions natively #2512
Sigma-Ma wants to merge 1 commit into
apache:master from
Sigma-Ma:Auron-2509-implement-native-date-add-and-date-sub

Conversation

@Sigma-Ma

@Sigma-Ma Sigma-Ma commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #2509

Rationale for this change

date_add and date_sub currently fall back to Spark. This adds native support alongside the existing date functions.

What changes are included in this PR?

  • Convert Spark DateAdd and DateSub expressions to native extension functions.
  • Implement Date32 arithmetic with Spark-compatible null propagation and integer wrapping.
  • Add Rust and Spark tests for calendar boundaries, negative offsets, integer types, overflow, and input casts.

Are there any user-facing changes?

date_add and date_sub can now run natively. No new configuration is required.

How was this patch tested?

  • cargo test -p datafusion-ext-functions --lib --locked.
  • ./build/mvn -pl spark-extension-shims-spark -am install -DskipTests -Ppre -Pspark-3.5 -Pscala-2.12.
  • ./dev/reformat --check.
  • ./build/mvn -pl spark-extension-shims-spark test -DskipBuildNative -Ppre -Pspark-3.5 -Pscala-2.12 -Dsuites=org.apache.auron.AuronFunctionSuite.

Was this patch authored or co-authored using generative AI tooling?

  • Yes
  • No

ASF guidance: https://www.apache.org/legal/generative-tooling.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@richox richox richox approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Implement native functions of date_add and date_sub

2 participants

AltStyle によって変換されたページ (->オリジナル) /