-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-52617][SQL]Cast TIME to/from TIMESTAMP_NTZ #51381
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
base: master
Are you sure you want to change the base?
[SPARK-52617][SQL]Cast TIME to/from TIMESTAMP_NTZ #51381
Conversation
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
Outdated
Show resolved
Hide resolved
4167bf1
to
828d214
Compare
...st/src/main/scala/org/apache/spark/sql/catalyst/analysis/RewriteTimeCastToTimestampNTZ.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/CastSuiteBase.scala
Outdated
Show resolved
Hide resolved
...in/scala/org/apache/spark/sql/catalyst/analysis/resolver/RewriteTimeCastToTimestampNTZ.scala
Outdated
Show resolved
Hide resolved
.../scala/org/apache/spark/sql/catalyst/analysis/resolver/TimezoneAwareExpressionResolver.scala
Outdated
Show resolved
Hide resolved
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.
On a separate note, is the new rule necessary? Should we try and place this in existing type coercion rules?
...st/src/main/scala/org/apache/spark/sql/catalyst/analysis/RewriteTimeCastToTimestampNTZ.scala
Outdated
Show resolved
Hide resolved
.../scala/org/apache/spark/sql/catalyst/analysis/resolver/TimezoneAwareExpressionResolver.scala
Outdated
Show resolved
Hide resolved
.../scala/org/apache/spark/sql/catalyst/analysis/resolver/TimezoneAwareExpressionResolver.scala
Outdated
Show resolved
Hide resolved
.../scala/org/apache/spark/sql/catalyst/analysis/resolver/TimezoneAwareExpressionResolver.scala
Outdated
Show resolved
Hide resolved
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/util/DateTimeUtils.scala
Outdated
Show resolved
Hide resolved
...a/org/apache/spark/sql/catalyst/analysis/resolver/TimezoneAwareExpressionResolverSuite.scala
Outdated
Show resolved
Hide resolved
fa1daa9
to
fd1aef3
Compare
…ysis/RewriteTimeCastToTimestampNTZ.scala Co-authored-by: Mihailo Timotic <[email protected]>
…/DateTimeUtils.scala Co-authored-by: Mihailo Timotic <[email protected]>
@mihailotim-db Should I make |
f7d1226
to
fd5e76e
Compare
What changes were proposed in this pull request?
This PR adds support for casting TIME to/from TIMESTAMP_NTZ type
Why are the changes needed?
Adds casting support between 2 types.
Does this PR introduce any user-facing change?
yes
How was this patch tested?
By running the related test suites: CastSuiteBase
By manual tests:
Was this patch authored or co-authored using generative AI tooling?
yes
Generated / corrected with AI assistance: chatGPT