Skip to content

[SPARK-41462][SQL] Date and timestamp type can up cast to TimestampNTZ#38997

Closed
gengliangwang wants to merge 1 commit intoapache:masterfrom
gengliangwang:canUpCastNTZ
Closed

[SPARK-41462][SQL] Date and timestamp type can up cast to TimestampNTZ#38997
gengliangwang wants to merge 1 commit intoapache:masterfrom
gengliangwang:canUpCastNTZ

Conversation

@gengliangwang
Copy link
Member

What changes were proposed in this pull request?

Handle TimestampNTZ in Cast.canUpCast:

  • Date and timestamp type can up cast to TimestampNTZ.
  • TimestampNTZ can up cast to Timestamp

Why are the changes needed?

Handle TimestampNTZ correctly in Cast.canUpCast.

Does this PR introduce any user-facing change?

No, TimestampNTZ is not release yet.

How was this patch tested?

New UT

@MaxGekk
Copy link
Member

MaxGekk commented Dec 9, 2022

+1, LGTM. Merging to master.
Thank you, @gengliangwang and @cloud-fan for review.

@MaxGekk MaxGekk closed this in 928eab6 Dec 9, 2022
beliefer pushed a commit to beliefer/spark that referenced this pull request Dec 18, 2022
### What changes were proposed in this pull request?

Handle TimestampNTZ in `Cast.canUpCast`:
* Date and timestamp type can up cast to TimestampNTZ.
* TimestampNTZ can up cast to Timestamp

### Why are the changes needed?

Handle TimestampNTZ correctly in Cast.canUpCast.

### Does this PR introduce _any_ user-facing change?

No, TimestampNTZ is not release yet.
### How was this patch tested?

New UT

Closes apache#38997 from gengliangwang/canUpCastNTZ.

Authored-by: Gengliang Wang <gengliang@apache.org>
Signed-off-by: Max Gekk <max.gekk@gmail.com>
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