Repository navigation
Conversation
The dynamic column contract proof parses pivot SQL with SQLQuack's shared parser (DuckDB, MotherDuck, Snowflake) instead of Polyglot. DuckDB trees match Polyglot's exactly; a Snowflake aggregate keeps its argument in a call's argument list, which the proof now reads. Other dialects keep the existing unsupported-dialect message.
kvlonge
enabled auto-merge (squash)
November 8, 2026 02:10
kvlonge
disabled auto-merge
November 8, 2026 12:36
…roofs Newer SQLQuack Snowflake parsers refuse a bare __ref(...) or __source(...) in FROM, so the proof parses the model SQL through the shared markers_as_names helper and renames each dependency marker's table or column node back to the relation its call names.
…ofs and rule facts Both crates carried the same iterative deeper_than; sql_tree now owns it. The deep pivot test asserts its expected outcome directly.
A __dbt_ref passthrough named its internal placeholder in the failure reason; it now fails as before. The marker scan reads comments and strings with the dialect the proof parses, so MotherDuck scans as DuckDB.
Contributor
Author
|
Folded into the single combined sqlbuild PR (D625/D626), which the SQLBuild lane is assembling now and opens once #1377 lands. Branch kept. |
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.
Why
The dynamic column contract proof (K011) still parsed pivot SQL with Polyglot through the analysis session's dict helpers. SQLBuild is moving every parse onto SQLQuack.
Changes
SUM(amount)as a named call with an argument list, where Polyglot used a dedicated node. The proof reads the call's single argument as the aggregated value.__ref("…")in a Snowflake FROM. The proof now parses through the shared relation-marker helper and reads__ref/__source/__seedback as their relations. Other markers resolve to no relation.Verification
__refand DuckDB__dbt_refpassthrough cases. Without the marker step two Snowflake cases fail on feat: parse rule facts, types and syntax trees with SQLQuack #1374's pin.PIVOT FROM WHEREstill reports "Unexpected token: From".DuckShop: not applicable. DuckDB trees are unchanged, so no new DuckDB shape exists to add, and DuckShop cannot run Snowflake pivots.