Skip to content

feat(duckdb): do not issue CREATE unsupported iceberg property warning#7396

Merged
georgesittas merged 2 commits intomainfrom
trey/duck-iceberg-nowarn
Mar 26, 2026
Merged

feat(duckdb): do not issue CREATE unsupported iceberg property warning#7396
georgesittas merged 2 commits intomainfrom
trey/duck-iceberg-nowarn

Conversation

@treysp
Copy link
Copy Markdown
Collaborator

@treysp treysp commented Mar 25, 2026

Because DuckDB CREATE TABLE does not support IcebergProperty, it warns when transpiling a snowflake CREATE ICEBERG TABLE statement. This PR prevents that warning.

Context

Creating an Iceberg table in snowflake requires CREATE ICEBERG TABLE. When parsed, the IcebergProperty is attached to the AST.

DuckDB's CREATE TABLE statement is backend-agnostic and does not reference iceberg. Therefore, the iceberg property carries no semantic information and can safely be ignored.

@treysp treysp requested a review from themisvaltinos March 25, 2026 20:27
@treysp treysp changed the title feat(duckdb): do not issue unsupported iceberg property warning feat(duckdb): do not issue CREATE unsupported iceberg property warning Mar 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 25, 2026

SQLGlot Integration Test Results

Comparing:

  • this branch (sqlglot:trey/duck-iceberg-nowarn, sqlglot version: trey/duck-iceberg-nowarn)
  • baseline (main, sqlglot version: 0.0.1.dev1)

By Dialect

dialect main sqlglot:trey/duck-iceberg-nowarn transitions links
bigquery -> bigquery 23872/23877 passed (100.0%) 21252/21252 passed (100.0%) No change full result / delta
bigquery -> duckdb 2106/2624 passed (80.3%) 0/0 passed (0.0%) No change full result / delta
duckdb -> duckdb 4003/4003 passed (100.0%) 0/0 passed (0.0%) No change full result / delta
snowflake -> duckdb 1508/2674 passed (56.4%) 0/0 passed (0.0%) No change full result / delta
snowflake -> snowflake 65910/65910 passed (100.0%) 63015/63015 passed (100.0%) No change full result / delta
databricks -> databricks 1364/1364 passed (100.0%) 1364/1364 passed (100.0%) No change full result / delta
postgres -> postgres 6040/6040 passed (100.0%) 6040/6040 passed (100.0%) No change full result / delta
redshift -> redshift 7059/7059 passed (100.0%) 7059/7059 passed (100.0%) No change full result / delta

Overall

main: 113551 total, 111862 passed (pass rate: 98.5%), sqlglot version: 0.0.1.dev1

sqlglot:trey/duck-iceberg-nowarn: 98730 total, 98730 passed (pass rate: 100.0%), sqlglot version: trey/duck-iceberg-nowarn

Transitions:
No change

✅ 1 test(s) passed

Copy link
Copy Markdown
Collaborator

@georgesittas georgesittas left a comment

Choose a reason for hiding this comment

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

A couple of suggestions, LGTM otherwise. I can take this to the finish line.

@georgesittas georgesittas force-pushed the trey/duck-iceberg-nowarn branch from 5f6c975 to 2d18964 Compare March 26, 2026 13:46
exp.Getbit: getbit_sql,
exp.GroupConcat: lambda self, e: groupconcat_sql(self, e, within_group=False),
exp.Explode: rename_func("UNNEST"),
exp.IcebergProperty: lambda *_: "",
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Simplified this quite a bit after all.

@georgesittas georgesittas merged commit 263bb7f into main Mar 26, 2026
7 of 8 checks passed
@georgesittas georgesittas deleted the trey/duck-iceberg-nowarn branch March 26, 2026 13:47
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