Skip to content

Conversation

davidlghellin
Copy link
Contributor

Which issue does this PR close?

part of #15914

Rationale for this change

Migrate spark functions from https://github.com/lakehq/sail/ to datafusion engine to unify codebase

What changes are included in this PR?

implement spark udf make_interval
https://spark.apache.org/docs/latest/api/sql/index.html#make_dt_interval

Are these changes tested?

unit-tests and sqllogictests added

Are there any user-facing changes?

now can be called in queries

@davidlghellin davidlghellin marked this pull request as draft September 22, 2025 21:40
@github-actions github-actions bot added the spark label Sep 22, 2025
@github-actions github-actions bot added the sqllogictest SQL Logic Tests (.slt) label Sep 23, 2025
@davidlghellin davidlghellin marked this pull request as ready for review September 23, 2025 12:24
}

fn return_type(&self, _arg_types: &[DataType]) -> Result<DataType> {
Ok(DataType::Duration(Microsecond))
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be an interval instead right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we include a comment here with this explanation for future reference?

@davidlghellin davidlghellin marked this pull request as draft September 24, 2025 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spark sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants