Skip to content

Datetime and other temporal datatypes parsing #329

Merged
fdosani merged 5 commits intodevelopfrom
datatype_fix
Mar 25, 2025
Merged

Datetime and other temporal datatypes parsing #329
fdosani merged 5 commits intodevelopfrom
datatype_fix

Conversation

@gladysteh99
Copy link
Copy Markdown
Contributor

This PR fixes two bugs.

  1. For columns that only includes date (not datetime) eg. "2023-01-08", polars support for find_column_type was parsing it incorrectly as timestamp, which leads to mismatch in sql format. This is now fixed, and added support for time (%H:%M:%S) as well.
  2. When copying from internal stage parquet files to table or vice versa, if there are columns stored as datetime or any of the temporal datatype, snowflake will not parse it properly as the time is stored as epoch time in parquet files. One of the fix is to allow users to specify a file format where USE_LOGICAL_TYPE = TRUE; to allow proper transfer. More information here.

@fdosani
Copy link
Copy Markdown
Member

fdosani commented Mar 21, 2025

@gladysteh99 could you add some integration tests too for this so we can test in snowflake offline?

Copy link
Copy Markdown
Member

@fdosani fdosani left a comment

Choose a reason for hiding this comment

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

LGTM

@fdosani fdosani merged commit 6339c80 into develop Mar 25, 2025
7 checks passed
@fdosani fdosani mentioned this pull request Mar 25, 2025
@fdosani fdosani deleted the datatype_fix branch January 26, 2026 20:21
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.

2 participants