Skip to content

[SPARK-51415][SQL] Support the time type by make_timestamp() #51543

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

uros-db
Copy link
Contributor

@uros-db uros-db commented Jul 18, 2025

What changes were proposed in this pull request?

Modify the make_timestamp function to create a timestamp from date and time (and optional timezone).

make_timestamp(date[, time[, timezone]])

Arguments

  • date: A date expression
  • time: A time expression

Returns

  • A TIMESTAMP.

Examples

> SELECT make_timestamp(DATE'2014-12-28', TIME'6:30:45.887');
 2014-12-28 06:30:45.887

Why are the changes needed?

Users will be able to create a timestamp with (or without time zone) by using a date and time inputs.

Does this PR introduce any user-facing change?

Yes, it adds new SQL function syntax support.

How was this patch tested?

New unit tests for timestamp calculation, catalyst expression level unit tests with & without codegen, Scala function unit tests, e2e SQL tests / golden files in both ANSI and non-ANSI modes.

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

No.

@github-actions github-actions bot added the SQL label Jul 18, 2025
@uros-db uros-db changed the title [WIP][SPARK-51415] Support the time type by make_timestamp() [WIP][SPARK-51415][SQL] Support the time type by make_timestamp() Jul 18, 2025
@uros-db uros-db changed the title [WIP][SPARK-51415][SQL] Support the time type by make_timestamp() [SPARK-51415][SQL] Support the time type by make_timestamp() Jul 20, 2025
Copy link
Contributor Author

@uros-db uros-db left a comment

Choose a reason for hiding this comment

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

One CI failure, looks unrelated. Re-running the test to see if it clears.

Otherwise, ready for review @MaxGekk.

Copy link
Member

@MaxGekk MaxGekk left a comment

Choose a reason for hiding this comment

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

@uros-db Could you test the cases #51179 (review)

@uros-db uros-db requested a review from MaxGekk July 22, 2025 11:55
@MaxGekk
Copy link
Member

MaxGekk commented Jul 22, 2025

cc @yaooqinn @LuciferYang @cloud-fan since you reviewed my PR: #51179

@uros-db uros-db requested a review from MaxGekk July 23, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants