Skip to content

[datafusion-spark] Implement Spark date function next_day #16775

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

Given the importance of Apache Spark in the analytics ecosystem, many users of DataFusion are interested in Spark compatible functions. We are in the process of adding a Spark compatible function library in the datafusion-spark crate in DataFusion: https://github.com/apache/datafusion/tree/main/datafusion/spark

This ticket is part of a series of ticket to implement those functions in DataFusion.

Describe the solution you'd like

Implement the function listed above in the datafusion-spark crate

Describe alternatives you've considered

  1. Find the relevant test file https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/test_files/spark/datetime/next_day.slt
  2. Add the function implementation (copy/paste from sail https://github.com/lakehq/sail/blob/main/crates/sail-plan/src/extension/function/datetime/spark_next_day.rs)
  3. Add additional tests / documentation as needed. Instructions for testing are here and you can see some examples in the PRs linked below

Notes:

  • You can run the tests via cargo test --test sqllogictests -- spark

Examples to follow:

Reference Implementations

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions