Skip to content

Conversation

@fivetran-felixhuang
Copy link
Collaborator

https://docs.snowflake.com/en/sql-reference/functions/to_date

The transpilation of TO_DATE mostly works. The only case that doesn't work is when the input is an expression that evaluates to a string containing an integer

@github-actions
Copy link
Contributor

SQLGlot Integration Test Results

Comparing:

  • this branch (sqlglot:transpile_to_date_snowflake_duckdb, sqlglot version: transpile_to_date_snowflake_duckdb)
  • baseline (main, sqlglot version: 28.5.1.dev49)

⚠️ Limited to dialects: duckdb, snowflake

By Dialect

dialect main sqlglot:transpile_to_date_snowflake_duckdb difference links
duckdb -> duckdb 4003/4003 passed (100.0%) 4003/4003 passed (100.0%) No change full result / delta
snowflake -> duckdb 626/1085 passed (57.7%) 626/1085 passed (57.7%) No change full result / delta
snowflake -> snowflake 981/1085 passed (90.4%) 981/1085 passed (90.4%) No change full result / delta

Overall

main: 6173 total, 5610 passed (pass rate: 90.9%), sqlglot version: 28.5.1.dev49

sqlglot:transpile_to_date_snowflake_duckdb: 6173 total, 5610 passed (pass rate: 90.9%), sqlglot version: transpile_to_date_snowflake_duckdb

Difference: No change

@georgesittas
Copy link
Collaborator

Thanks for taking a stab at this @fivetran-felixhuang, but given the nuances of this transpilation I'd say let's hold off dealing with this for now. Refer to my reply in the corresponding Jira ticket as well.

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.

3 participants