feat(duckdb): Add transpilation support for PREVIOUS_DAY function#6732
feat(duckdb): Add transpilation support for PREVIOUS_DAY function#6732fivetran-amrutabhimsenayachit wants to merge 2 commits intomainfrom
Conversation
SQLGlot Integration Test ResultsComparing:
By Dialect
Overallmain: 5697 total, 5449 passed (pass rate: 95.6%), sqlglot version: sqlglot:RD-1069371-previous-day: 5697 total, 5449 passed (pass rate: 95.6%), sqlglot version: Difference: No change |
|
@fivetran-amrutabhimsenayachit nice work. The feedback I gave for #6728 applies to this PR as well. Let's consolidate |
Consolidated NEXT_DAY and PREVIOUS_DAY implementation. Refer #6728 |
|
Closing this in favor of 6278 then, thanks! |
|
Closing this PR as NEXT_DAY and PREVIOUS_DAY implementations have been consolidated in #6728 |
Snowflake's PREVIOUS_DAY(date, day_name) function is not supported in DuckDB. SQLGlot passes the PREVIOUS_DAY function through unchanged, causing a runtime error in DuckDB: "Scalar Function with name previous_day does not exist!"
DuckDB lacks a native PREVIOUS_DAY function, requiring synthesis using:
After: