Skip to content

refactor(bigframes): enable sqlglot as the default compiler with failsafe mechanism#16602

Merged
chelsea-lin merged 2 commits intomainfrom
main_chelsealin_enablesqlglot
Apr 24, 2026
Merged

refactor(bigframes): enable sqlglot as the default compiler with failsafe mechanism#16602
chelsea-lin merged 2 commits intomainfrom
main_chelsealin_enablesqlglot

Conversation

@chelsea-lin
Copy link
Copy Markdown
Contributor

@chelsea-lin chelsea-lin commented Apr 9, 2026

Internal issue 417774347

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a compiler fallback mechanism in the BigQueryCachingExecutor, allowing the system to switch from sqlglot to ibis if a BadRequest occurs during compilation. It replaces the compiler utility with a more flexible compile_sql function and adds tracking labels to BigQuery jobs to identify the used compiler. Feedback identifies a critical AttributeError due to an outdated __all__ entry, a typo in the newly added unit tests, and a potential parsing risk when applying sqlglot_ir transformations to SQL generated by the ibis compiler during fallback.

Comment thread packages/bigframes/bigframes/core/compile/__init__.py
Comment thread packages/bigframes/tests/unit/session/test_bq_caching_executor.py Outdated
Comment thread packages/bigframes/bigframes/session/bq_caching_executor.py
@chelsea-lin chelsea-lin force-pushed the main_chelsealin_enablesqlglot branch 2 times, most recently from c03a02e to 2b783e3 Compare April 9, 2026 21:18
@parthea parthea changed the title refactor: enable sqlglot as the default compiler with failsafe mechanism refactor(bigframes): enable sqlglot as the default compiler with failsafe mechanism Apr 9, 2026
@chelsea-lin chelsea-lin force-pushed the main_chelsealin_enablesqlglot branch 2 times, most recently from 4f06f33 to 14b42b0 Compare April 20, 2026 23:16
@chelsea-lin chelsea-lin marked this pull request as ready for review April 20, 2026 23:53
@chelsea-lin chelsea-lin requested review from a team as code owners April 20, 2026 23:53
@chelsea-lin chelsea-lin force-pushed the main_chelsealin_enablesqlglot branch from 14b42b0 to ef9450f Compare April 24, 2026 20:26
@chelsea-lin chelsea-lin merged commit 7bb29e5 into main Apr 24, 2026
30 checks passed
@chelsea-lin chelsea-lin deleted the main_chelsealin_enablesqlglot branch April 24, 2026 20:55
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