Skip to content

[SPARK-47406][SQL] Handle TIMESTAMP and DATETIME in MYSQLDialect - #45530

Closed
yaooqinn wants to merge 2 commits into
apache:masterfrom
yaooqinn:SPARK-47406
Closed

yaooqinn wants to merge 2 commits into
apache:masterfrom
yaooqinn:SPARK-47406

Conversation

@yaooqinn

Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

In MySQL, TIMESTAMP and DATETIME are different. The former is a TIMESTAMP WITH LOCAL TIME ZONE and the latter is a TIMESTAMP WITHOUT TIME ZONE

Following SPARK-47375, MySql TIMESTAMP goes directly to TimestampType, DATETIME's mapping is decided by preferTimestampNTZ.

Why are the changes needed?

align the guidelines for jdbc timestamps

Does this PR introduce any user-facing change?

yes,migration guide provided

How was this patch tested?

new tests

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

@yaooqinn

Copy link
Copy Markdown
Member Author

cc @cloud-fan

@yaooqinn

Copy link
Copy Markdown
Member Author

Merged to master.

Thank you @cloud-fan for the check

@yaooqinn yaooqinn closed this in 19ac1fc Mar 15, 2024
@yaooqinn
yaooqinn deleted the SPARK-47406 branch March 27, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants