-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-53319][SQL] Support the time type by try_make_timestamp_ltz() #52063
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
Conversation
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Show resolved
Hide resolved
|
changes look good, but I see the build is failing. Seems like it could be a transient issue, can you try rerunning the build? |
|
Docker Integration failure looks unrelated to these changes, re-running to confirm. |
jcw024
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes LGTM!
|
cc @cloud-fan for review |
|
@cloud-fan Please review. |
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Outdated
Show resolved
Hide resolved
…essions/datetimeExpressions.scala
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
Outdated
Show resolved
Hide resolved
|
thanks, merging to master! |
### What changes were proposed in this pull request? In the PR, I propose to extend the `try_make_timestamp_ltz` function, and accept a date and time fields. **Syntax** ``` try_make_timestamp_ltz(date[, time]) ``` **Arguments** - `date`: A date expression. - `time`: A time expression. **Returns** A `TIMESTAMP_LTZ`. Examples ``` > SELECT try_make_timestamp_ltz(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 local time zone by combining a time and a date. ### Does this PR introduce _any_ user-facing change? Yes, this extends `try_make_timestamp_ltz` to accept additional kinds of inputs. ### How was this patch tested? Added new e2e SQL tests in corresponding golden files. ### Was this patch authored or co-authored using generative AI tooling? No. Closes apache#52063 from uros-db/try_make_timestamp_ltz. Lead-authored-by: Uros Bojanic <[email protected]> Co-authored-by: Wenchen Fan <[email protected]> Signed-off-by: Wenchen Fan <[email protected]>
What changes were proposed in this pull request?
In the PR, I propose to extend the
try_make_timestamp_ltzfunction, and accept a date and time fields.Syntax
Arguments
date: A date expression.time: A time expression.Returns
A
TIMESTAMP_LTZ.Examples
Why are the changes needed?
Users will be able to create a timestamp with local time zone by combining a time and a date.
Does this PR introduce any user-facing change?
Yes, this extends
try_make_timestamp_ltzto accept additional kinds of inputs.How was this patch tested?
Added new e2e SQL tests in corresponding golden files.
Was this patch authored or co-authored using generative AI tooling?
No.