Skip to content

feat(snowflake): transpile Snowflake IDENTIFIER function to DuckDB#7723

Open
fivetran-kwoodbeck wants to merge 3 commits into
mainfrom
transpile/snowflake-identifier-function
Open

feat(snowflake): transpile Snowflake IDENTIFIER function to DuckDB#7723
fivetran-kwoodbeck wants to merge 3 commits into
mainfrom
transpile/snowflake-identifier-function

Conversation

@fivetran-kwoodbeck

Copy link
Copy Markdown
Collaborator

Snowflake's IDENTIFIER(), which resolves a string to a runtime identifier, previously fell through to exp.Anonymous. This folds it into a typed exp.Identifier node (flagged with identifier_func=True) so the Snowflake generator reconstructs IDENTIFIER('name') and the DuckDB generator emits a native identifier. It includes splitting dot-qualified names like IDENTIFIER('t1.col') into a proper exp.Dot chain.

Non-foldable args like IDENTIFIER($var) remain as exp.Anonymous so they round-trip correctly.

Behavior

Snowflake input DuckDB output
IDENTIFIER('col') col
IDENTIFIER('t1.col') t1.col
IDENTIFIER('"Col"') "Col"
IDENTIFIER($var) IDENTIFIER($var)

@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

SQLGlot Integration Test Results

✅ All tests passed

Comparing:

  • this branch (sqlglot:transpile/snowflake-identifier-function @ sqlglot 0853a80)
  • baseline (main @ sqlglot a76439c)

Overall

main: 192441 total, 153536 passed (pass rate: 79.8%)

sqlglot:transpile/snowflake-identifier-function: 110922 total, 110162 passed (pass rate: 99.3%)

Transitions:
No change

Dialect pair changes: 0 previous results not found, 1 current results not found

✅ All tests passed

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.

1 participant