Skip to content

feat(snowflake)!: transpilation support current_version#6960

Merged
geooo109 merged 1 commit intomainfrom
RD-1069314-transpile-current_version
Feb 6, 2026
Merged

feat(snowflake)!: transpilation support current_version#6960
geooo109 merged 1 commit intomainfrom
RD-1069314-transpile-current_version

Conversation

@fivetran-ashashankar
Copy link
Copy Markdown
Collaborator

@fivetran-ashashankar fivetran-ashashankar commented Feb 4, 2026

Transpilation support for current_version()

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 4, 2026

SQLGlot Integration Test Results

Comparing:

  • this branch (sqlglot:RD-1069314-transpile-current_version, sqlglot version: RD-1069314-transpile-current_version)
  • baseline (main, sqlglot version: 28.9.1.dev21)

⚠️ Limited to dialects: duckdb

By Dialect

dialect main sqlglot:RD-1069314-transpile-current_version difference links
duckdb -> duckdb 4003/4003 passed (100.0%) 4003/4003 passed (100.0%) No change full result / delta

Overall

main: 4003 total, 4003 passed (pass rate: 100.0%), sqlglot version: 28.9.1.dev21

sqlglot:RD-1069314-transpile-current_version: 4003 total, 4003 passed (pass rate: 100.0%), sqlglot version: RD-1069314-transpile-current_version

Difference: No change

Copy link
Copy Markdown
Collaborator

@geooo109 geooo109 left a comment

Choose a reason for hiding this comment

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

Let's also include tests.

Moreover, why we have introduced a new token ?
We want to cover the transpilation from Snowflake -> Duckdb.

In snowflake:

ast = parse_one("SELECT CURRENT_VERSION()", dialect="snowflake")

ast:
Select(
  expressions=[
    CurrentVersion()])

So, we only need to apply the rename in the duckdb generator. (as you have already added)

Let's also add the parsing of the version in duckdb, and test the roundtrip.

Comment thread tests/dialects/test_duckdb.py Outdated
Comment thread tests/dialects/test_duckdb.py Outdated
Comment thread tests/dialects/test_duckdb.py Outdated
Comment thread tests/dialects/test_snowflake.py
Comment thread tests/dialects/test_snowflake.py Outdated
@fivetran-ashashankar fivetran-ashashankar force-pushed the RD-1069314-transpile-current_version branch from cc699a7 to f695512 Compare February 5, 2026 20:13
@geooo109
Copy link
Copy Markdown
Collaborator

geooo109 commented Feb 6, 2026

I will merge and take it to the finish line.

@geooo109 geooo109 merged commit 19f9000 into main Feb 6, 2026
10 of 13 checks passed
@geooo109 geooo109 deleted the RD-1069314-transpile-current_version branch February 6, 2026 09:26
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