fix: emit bracketed inline array syntax for scalar subquery expressions - #17716
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the inline_array_unless_query function in the vendored sqlglot dialect to more precisely detect when an array expression contains a single query or subquery. It also adds a corresponding unit test and snapshot to verify that ToArrayOp correctly compiles with a subquery expression. There are no review comments to address, and the changes look solid.
shuoweil
marked this pull request as draft
July 14, 2026 23:46
shuoweil
marked this pull request as ready for review
July 16, 2026 00:19
TrevorBergeron
approved these changes
Jul 16, 2026
shuoweil
pushed a commit
that referenced
this pull request
Jul 16, 2026
🤖 I have created a release *beep* *boop* --- ## [2.46.0](bigframes-v2.45.0...bigframes-v2.46.0) (2026-07-16) ### Features * **bigframes:** Support groupby.agg/transform with udf transpiler ([#17613](#17613)) ([cae94f9](cae94f9)) * **bigframes:** support offset-based column access via iloc ([#17367](#17367)) ([4253fab](4253fab)) ### Bug Fixes * **bigframes:** Fix sqlglot backend regressions ([#17655](#17655)) ([91f93bc](91f93bc)) * bump gradio from 6.15.0 to 6.15.1 in /packages/bigframes ([#17712](#17712)) ([a85d59f](a85d59f)) * bump mistune from 3.2.1 to 3.3.0 in /packages/bigframes ([#17694](#17694)) ([e5f7fef](e5f7fef)) * bump soupsieve from 2.7 to 2.8.4 in /packages/bigframes ([#17695](#17695)) ([635da34](635da34)) * bump transformers from 5.3.0 to 5.5.0 in /packages/bigframes ([#17700](#17700)) ([4b049c4](4b049c4)) * emit bracketed inline array syntax for scalar subquery expressions ([#17716](#17716)) ([ce5fd50](ce5fd50)) ### Documentation * make landing page quickstart runnable ([fc423c8](fc423c8)) * make landing page quickstart runnable ([#17687](#17687)) ([fc423c8](fc423c8)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes a SQLGlot transpilation bug in BigQuery array generation where single-element arrays containing scalar subqueries wrapped in expressions (e.g.,
COALESCE(CAST(...))orROUND(...)) produced invalid BigQuery SQL syntaxARRAY(COALESCE(...)), causing BigQuery400 Syntax error: Unexpected identifier "COALESCE"errors on.cache().Verified at:
before: screen/9AmutJHVDJuafwm
after: screen/u7aW9tTLB8ybUFW
Fixes #<534824500> 🦕