Skip to content

BigQuery: enable FROM-first SELECT (pipe syntax entry form)#6

Merged
moshap-firebolt merged 1 commit into
firebolt/v0.62.0-patchesfrom
moshap/bigquery-from-first-select
Jul 21, 2026
Merged

BigQuery: enable FROM-first SELECT (pipe syntax entry form)#6
moshap-firebolt merged 1 commit into
firebolt/v0.62.0-patchesfrom
moshap/bigquery-from-first-select

Conversation

@moshap-firebolt

@moshap-firebolt moshap-firebolt commented Jul 21, 2026

Copy link
Copy Markdown

Enables supports_from_first_select for BigQueryDialect so FROM t |> … (GoogleSQL's canonical pipe entry form) and plain FROM t parse. Matches ClickHouse/DuckDB/Generic. 55 bigquery tests pass.


Note

Low Risk
Single dialect capability flag with no auth, data, or core parser logic changes beyond BigQuery parsing behavior.

Overview
BigQuery now opts into FROM-first SELECT parsing by implementing supports_from_first_select on BigQueryDialect (returns true).

This aligns BigQuery with ClickHouse, DuckDB, and Generic dialects so the parser accepts GoogleSQL’s canonical pipe entry form (FROM t |> WHERE …) and plain FROM-leading queries, complementing the existing supports_pipe_operator flag.

Reviewed by Cursor Bugbot for commit 75169d2. Bugbot is set up for automated code reviews on this repo. Configure here.

GoogleSQL allows a query to start with FROM — the canonical entry form for
pipe syntax (`FROM t |> WHERE …`) as well as plain `FROM t`. BigQueryDialect
already enables supports_pipe_operator but left supports_from_first_select at
the default (false), so `FROM t |> …` failed to parse with "Expected: SELECT,
VALUES, or a subquery in the query body, found: FROM". Enable it, matching the
ClickHouse/DuckDB/Generic dialects.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@moshap-firebolt
moshap-firebolt merged commit 26b5faa into firebolt/v0.62.0-patches Jul 21, 2026
8 of 9 checks passed
@moshap-firebolt

Copy link
Copy Markdown
Author

Post-hoc review note (flagging for visibility): this was merged into firebolt/v0.62.0-patches as part of packdb PR firebolt-analytics/packdb#24299 (BigQuery pipe query syntax).

Scope: a single additive 7-line change — BigQueryDialect::supports_from_first_select() -> true, so GoogleSQL's canonical FROM t |> … pipe entry form (and plain FROM t) parse, matching ClickHouse/DuckDB/Generic. No behavior change for any other dialect.

Verification: cargo test --test sqlparser_bigquery (55 tests) passed; FROM-first + SELECT-first pipe queries parse correctly.

Rollback if desired: firebolt/v0.62.0-patches fast-forwarded eee77cb → 26b5faa, so it resets cleanly to eee77cb; the feature branch moshap/bigquery-from-first-select still exists. Please review and revert if you'd prefer this go through a different process.

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.

1 participant