Skip to content
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

feat!: Introducing TIMESTAMP_NTZ token and data type #3386

Merged
merged 4 commits into from
May 2, 2024

Conversation

VaggelisD
Copy link
Collaborator

Fixes #3379

Introduce token & datetype TIMESTAMP_NTZ in order to preserve the round-trip of all TIMESTAMP_* variations.

Both Spark3/DB and Snowflake allow TIMESTAMP to be configured to either _LTZ or _NTZ (Spark3/DB default to the former, Snowflake to the latter) in a session, so this PR also aims to holistically fix these hardcoded/lossy SQLGlot mappings.

Docs

Copy link
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

Do we have any tests for the TIMESTAMP_NTZ roundtrip in Snowflake?

tests/dialects/test_snowflake.py Outdated Show resolved Hide resolved
tests/dialects/test_spark.py Outdated Show resolved Hide resolved
@georgesittas georgesittas merged commit d1b4f1f into main May 2, 2024
5 checks passed
@georgesittas georgesittas deleted the vaggelisd/spark_timestamp branch May 2, 2024 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Spark's new Timestamp_Ntz and Timestamp_Ltz is missing
3 participants