Repository navigation
Conversation
GROUP BY ROLLUP (…), CUBE (…) and GROUPING SETS (…), at the top level or nested in GROUPING SETS, were generic function calls named ROLLUP, CUBE and "GROUPING SETS". They are now Rollup, Cube and GroupingSets nodes, so rules can match them and refusals name node:rollup, node:cube and node:grouping_sets. The form links follow, and GROUPING SETS gains the link its held obligations waited on.
…322) polyglot keeps GROUP BY ROLLUP (...), CUBE (...) and GROUPING SETS (...) as function calls, so its own grouping tests now differ from SQLQuack's rollup, cube and grouping_sets nodes. A structured_call entry names a SQLQuack node and polyglot's call; the check counts the difference as structured only when the trees are equal once each listed node holding only expressions is written back as that call, so any other difference still fails.
The three polyglot-check notes for ROLLUP, CUBE and GROUPING SETS named a decision number; the repository keeps those out of new text.
Contributor
Author
|
Closing: SQLQuack lands through local-gate trains, not PR merges (D94), so open PRs only add clutter (D628/D630). The branch is kept. Any work here that isn't on main yet is tracked by the train owner and lands through a train. |
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.
From the corpus run on 78910c3: give the everyday GROUP BY forms ROLLUP, CUBE and GROUPING SETS structured parse nodes, so rules can be written for them.
The change
GROUP BY ROLLUP (…),CUBE (…)andGROUPING SETS (…), at the top level or nested inside GROUPING SETS, parsed as generic function calls named ROLLUP, CUBE and "GROUPING SETS". Refusals named themfn:ROLLUP,fn:CUBEandfn:GROUPING SETS. Inparser/_helpers/queries/clauses.rsthey now parse to the existingExpression::Rollup,CubeandGroupingSetsnodes, so refusals readnode:rollup,node:cubeandnode:grouping_sets. The semantics paths (scope rules, query lineage) already handle these variants.form-links.tomllinks the three node constructs to their forms. GROUPING SETS gains the link its held obligations were waiting on.The other everyday forms
The other forms from that run already have structured nodes on main and only need rules: SAMPLE/TABLESAMPLE (
table.table_sample), AT time travel (table.when), TOP (select.top), NATURAL JOIN (joins[].kind),* RENAME(star.rename), LATERAL subqueries (subquery.lateral,joins[].this.lateral) and WITH RECURSIVE (with.recursive).Syntax coverage
The new parse trees change the fingerprints of
sf.query.group-by-cube,group-by-grouping-setsandgroup-by-rollup. Their definitions are unchanged, and their obligations stay fully met (55/55, 105/105, 55/55). The auditor re-reviewed all three at the new parser tree (reviewauditor-query-011, commit ce083ff), andsyntax-coverage diffreports no regression.Tests
test_parsergains rows for the three nodes, top-level and nested.Polyglot check
polyglot keeps these as function calls, so its own grouping-sets tests now differ. A new
[[structured_call]]kind incorpora/polyglot-check/expected_differences.tomlaccepts the difference only when the trees are equal once each listed node, holding onlyexpressions, is written back as polyglot's call; any other difference still fails.Gate
Pre-gate on f26178d (ce083ff + clean merge of main 9c008e0 + the polyglot-check structured-call entries; 78f05b0 adds only a notes wording change), every .rs touched before the build:
make check-merge: exit 0, 24/24 test binaries, including the polyglot exact test in the gate profile.sqlquack verify --require-verified --strict-errors --python: 12,033 cases, 0 failed; 226 of 226 equivalences and rules verified.syntax-coverage results … --againstmain 9c008e0's baseline: 0 regressions, 0 other changes.syntax-coverage stale: none;diff: 0 problems.At its slot: merge current main, re-gate the exact head, then fast-forward.
Audited: approved at 381ff30 (review entry ce083ff) and the polyglot delta at f26178d (record 31cd564). GitHub Actions is blocked by billing; the local D94 gate counts. Queued after #130 and its t006 delta.