Skip to content

fix(optimizer): unpivot annotate types#7543

Open
geooo109 wants to merge 3 commits intomainfrom
geooo109/unpivot_types
Open

fix(optimizer): unpivot annotate types#7543
geooo109 wants to merge 3 commits intomainfrom
geooo109/unpivot_types

Conversation

@geooo109
Copy link
Copy Markdown
Collaborator

Type annotation for unpivot of bq

DOCS
BigQuery UNPIVOT

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 22, 2026

SQLGlot Integration Test Results

Comparing:

  • this branch (sqlglot:geooo109/unpivot_types, sqlglot version: geooo109/unpivot_types)
  • baseline (main, sqlglot version: 0.0.1.dev1)

By Dialect

dialect main sqlglot:geooo109/unpivot_types transitions links
bigquery -> bigquery 24645/24650 passed (100.0%) 23495/23495 passed (100.0%) No change full result / delta
bigquery -> duckdb 867/1154 passed (75.1%) 0/0 passed (0.0%) Results not found full result / delta
duckdb -> duckdb 5823/5823 passed (100.0%) 0/0 passed (0.0%) Results not found full result / delta
snowflake -> duckdb 1063/1961 passed (54.2%) 0/0 passed (0.0%) Results not found full result / delta
snowflake -> snowflake 65133/65133 passed (100.0%) 63027/63027 passed (100.0%) No change full result / delta
databricks -> databricks 1370/1370 passed (100.0%) 1370/1370 passed (100.0%) No change full result / delta
postgres -> postgres 6042/6042 passed (100.0%) 6042/6042 passed (100.0%) No change full result / delta
redshift -> redshift 7101/7101 passed (100.0%) 7101/7101 passed (100.0%) No change full result / delta

Overall

main: 113234 total, 112044 passed (pass rate: 98.9%), sqlglot version: 0.0.1.dev1

sqlglot:geooo109/unpivot_types: 101035 total, 101035 passed (pass rate: 100.0%), sqlglot version: geooo109/unpivot_types

Transitions:
No change

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

✅ 34 test(s) passed

@georgesittas
Copy link
Copy Markdown
Collaborator

@geooo109 lemme know when this is ready to be reviewed.

@geooo109 geooo109 force-pushed the geooo109/unpivot_types branch from a540931 to cad8db5 Compare April 23, 2026 12:17
@geooo109 geooo109 marked this pull request as ready for review April 23, 2026 14:02
Comment on lines +337 to +338
if not isinstance(field_col, exp.Column) or not field.expressions:
continue
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

defensive

@geooo109 geooo109 changed the title fix(optimizer): unpivot annotate types for bq fix(optimizer): unpivot annotate types Apr 23, 2026
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.

2 participants