You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following conversion fails when executed by duckdb, because DATE is not a valid duckdb expression:
❯ python -c 'import sqlglot; print(repr(sqlglot.parse_one("SELECT date(a.start_date) from SOURCE_TABLE AS a", read="snowflake").sql(dialect="duckdb")));'
'SELECT DATE(a.start_date) FROM SOURCE_TABLE AS a'
sqlglot 21.2 didn't have this problem, and would cast a non-literal as date, eg:
❯ python -c 'import sqlglot; print(repr(sqlglot.parse_one("SELECT date(a.start_date) from SOURCE_TABLE AS a", read="snowflake").sql(dialect="duckdb")));'
'SELECT CAST(a.start_date AS DATE) FROM SOURCE_TABLE AS a'
The text was updated successfully, but these errors were encountered:
The following conversion fails when executed by duckdb, because
DATE
is not a valid duckdb expression:sqlglot 21.2 didn't have this problem, and would cast a non-literal as date, eg:
The text was updated successfully, but these errors were encountered: