Repository navigation
feat(native): resolve model configuration natively behind the preview engine - #1009
Merged
Merged
Conversation
Parses MODEL header columns and audits, expands ${...} config templates and scans config for templates and macro calls with the Python compiler's exact rules, deferring to Python wherever it cannot reproduce them.
… engine The model loop parses every model's header columns and audits in one native batch and expands config templates natively under native-preview. Python keeps every error: a native rejection re-runs Python, and a mismatch is raised if Python then succeeds.
Seeds now generate templated targets and model headers with typed, audited columns, render coverage requires them, and the failure corpus adds model config errors.
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
Header columns, audits and
${...}templates are parsed in Python for every model. This moves that work native behind the opt-innative-previewengine, byte-identical to Python or deferring to it.Changes
sqlbuild-model-configcrate: MODEL header columns and model audits,${...}template expansion (if,eq,ne,coalesce,ENV:,CTX:, variables) with its environment and context reads, and template and macro presence scans. Anything else defers to Python.model_configstage is enabled. It is registered at thepreviewtier, so the shippednativedefault is unchanged.SQLBUILD_COMPILER_ENGINE=python.Verification
make compiler-differentialwith captures and coverage: 151 identical, render 66/66, discovery 66/66;make compiler-differential-shipped: 145 identical; dense 3k and a large private project identical.make check-ci,make test(11495 passed),tests/e2e/scripts/compiler_differential.