Repository navigation
fix: stop false errors on stars, comments, set operations, snapshots and table-view switches - #1158
Merged
Merged
Conversation
kvlonge
enabled auto-merge (squash)
October 19, 2026 12:12
Re-analysing a model whose star waited on its inputs handed queries with a cast constant such as CAST(1 AS INTEGER) to the legacy analysis, which never expands stars, and then marked the star resolved. The model kept only its explicit columns, so a unique_key naming a starred column was a false B300 and downstream shapes lost columns. The compact analysis now answers any query whose star it expanded.
The Snowflake variant normalization in model analysis only recognised -- and /* */ comments, so an apostrophe or double quote inside a // comment opened a fake string and the compile failed with an internal analysis error. The scan now skips // line comments. BigQuery # comments already worked and are covered by the same end-to-end test.
A rebuilt snapshot compared its query's columns with the warehouse table, which also holds the snapshot's own valid_from and valid_to columns, so every second build planned a schema change listing them as removed. Schema change detection now leaves a snapshot's validity columns, default or renamed, out of the comparison.
…nd view A model already built as a table and changed to a view planned "recreate view", but CREATE OR REPLACE VIEW cannot replace a table, so the build failed; the reverse change failed when promotion renamed the existing view. When creating the view or promoting the table fails and the live catalog shows the destination is the other relation type, the build now drops it and retries. The extra catalog read happens only after such a failure.
…CI measurements Each absolute budget is now about 1.2x the slowest of two CI runs of this branch, and never below 1.15x the slowest recent CI run on the same code (runs based on 0.158.2 or later). That covers the fresh-process, cache, varied-cache, dense cold, warm and edit, and delta edit-loop wall budgets, the delta CPU ratios and the peak RSS limits. A limit already below that floor is unchanged. The fallback CPU limit, the 4 GiB cgroup and the same-runner ratio limits are unchanged.
…r query Adopt the Polyglot parser fix that stops a parenthesised query in FROM from absorbing a following UNION, INTERSECT or EXCEPT. Such models no longer raise false column-count errors, their star columns trace to every set-operation branch, and the formatter no longer nests the set operation inside the FROM query. Add end-to-end compile coverage for DuckDB, Snowflake, BigQuery and PostgreSQL, plus a DuckDB build case.
kvlonge
force-pushed
the
fix/false-errors-and-stale-caches
branch
from
October 19, 2026 15:06
54364e3 to
b13811d
Compare
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
Five bugs produced false errors or failed builds on valid projects: a star beside a cast constant lost its expanded columns, a quote inside a Snowflake
//comment broke compile, a set operation after an unaliased parenthesisedFROMquery was parsed into that subquery, a snapshot's second build reported its own validity columns as removed, and switching a model between table and view failed. Separately, the compile performance budgets had 40–100% headroom over CI measurements, so a large regression could pass.Changes
CAST(1 AS INTEGER)keeps its columns and downstream shapes.//line comments.FROM (SELECT …) UNION …at the outer query (no false column-count errors, correct lineage and formatting).Verification
FROMquery on DuckDB, Snowflake, BigQuery and PostgreSQL; snapshot rebuild with default and renamed columns; table→view and view→table); Rust tests for the analysis and normalisation fixes.