Skip to content

fix(optimizer)!: update annotate_types.py for maybe_coerce and explode functions - #7973

Merged
georgesittas merged 2 commits into
mainfrom
fix-annotate-type-bugs
Jul 28, 2026
Merged

fix(optimizer)!: update annotate_types.py for maybe_coerce and explode functions#7973
georgesittas merged 2 commits into
mainfrom
fix-annotate-type-bugs

Conversation

@fivetran-amrutabhimsenayachit

@fivetran-amrutabhimsenayachit fivetran-amrutabhimsenayachit commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator
Bug Root Cause Crash
_coerce_type DataType.this assumed to always be DType enum TypeError / bad comparison
_annotate_explode expression.this.type can be None or non-ARRAY AttributeError on .expressions

@fivetran-amrutabhimsenayachit fivetran-amrutabhimsenayachit changed the title feat(type-inference)!: update annotate_types.py for maybe_coerce and explode functions feat(optimizer)!: update annotate_types.py for maybe_coerce and explode functions Jul 27, 2026
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

SQLGlot Integration Test Results

✅ All tests passed

Comparing:

  • this branch (sqlglot:fix-annotate-type-bugs @ sqlglot 1bd7bc1)
  • baseline (main @ sqlglot a42bbbd)

By Dialect

dialect main feature branch transitions links
databricks -> databricks 9999/11820 passed (84.6%) 10000/11820 passed (84.6%) 1 fail -> pass full result / delta

Overall

main: 192414 total, 153544 passed (pass rate: 79.8%)

sqlglot:fix-annotate-type-bugs: 186043 total, 148216 passed (pass rate: 79.7%)

Transitions:
1 fail -> pass

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

✅ All tests passed

@georgesittas georgesittas changed the title feat(optimizer)!: update annotate_types.py for maybe_coerce and explode functions fix(optimizer)!: update annotate_types.py for maybe_coerce and explode functions Jul 28, 2026
@georgesittas
georgesittas merged commit 7ad56f6 into main Jul 28, 2026
10 checks passed
@georgesittas
georgesittas deleted the fix-annotate-type-bugs branch July 28, 2026 11:23
PiyaDaswadkar pushed a commit to PiyaDaswadkar/sqlglot that referenced this pull request Jul 29, 2026
…e functions (tobymao#7973)

* feat(tye-inference)!: update annotate_types.py for maybe_coerce and explode functions

* fix: add type assertions to interval span and explode struct tests
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