Repository navigation
Conversation
Contributor
Coverage Results ✅ |
peterbud
approved these changes
Jul 22, 2026
1 task
benfdking
added a commit
to quarylabs/sqruff
that referenced
this pull request
Oct 5, 2026
Port SQLFluff #8190 (72d0d389e7ae25a5719953597b55385e7d19870a). Add indent and dedent metadata around BigQuery pipe AGGREGATE and EXTEND expression lists. Add the three upstream LT02 regression cases. Upstream PR: sqlfluff/sqlfluff#8190 Upstream commit: sqlfluff/sqlfluff@72d0d38
benfdking
added a commit
to quarylabs/sqruff
that referenced
this pull request
Oct 5, 2026
Port SQLFluff #8190 (72d0d389e7ae25a5719953597b55385e7d19870a). Add indent and dedent metadata around BigQuery pipe AGGREGATE and EXTEND expression lists. Add the three upstream LT02 regression cases. Upstream PR: sqlfluff/sqlfluff#8190 Upstream commit: sqlfluff/sqlfluff@72d0d38
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.
Brief summary of the change made
Fixes #8189.
BigQuery pipe-syntax
AGGREGATEandEXTENDclauses take acomma-delimited expression list, like
SELECTandGROUP BY, but theirgrammar wrapped that list without
Indent/Dedentmetadata. As aresult
LT02(layout.indent) flagged every continuation line as "Lineshould not be indented", and
sqlfluff fixwould not indent amulti-line clause — so an indented multi-line
AGGREGATEwas impossible.This wraps the
Delimited(...)list of bothAggregateClauseSegmentand
ExtendClauseSegmentinIndent/Dedent, matching howGroupAndOrderByClauseSegment(theGROUP BYused in the same pipesyntax) already behaves.
Before:
After: lints clean, and
fixindents a flat list to the above.Are there any other side effects of this change that we should be aware of?
Indent/Dedentare meta segments and are excluded from the parseYAML fixtures, so existing
test/fixtures/dialects/bigqueryfixtures areunchanged. All 429 bigquery dialect tests and the LT01/LT02/LT03 rule
suites pass. Single-line
AGGREGATE/EXTENDare unaffected.Pull Request checklist
.ymlrule test cases intest/fixtures/rules/std_rule_cases(
LT02-indent.yml): a passing indented multi-lineAGGREGATE, afail/fixpair, and a passing multi-lineEXTEND.Summary by cubic
Fix indentation for BigQuery pipe
AGGREGATEandEXTENDclause lists. Adds indent metadata so multi-line lists are indented correctly, removing LT02 false positives and allowingsqlfluff fixto format them.Delimited(...)expression list inIndent/Dedentfor both clauses, matching pipeGROUP BY.AGGREGATEandEXTEND, including a fixable failure.Written for commit ef0bfab. Summary will update on new commits.