Repository navigation
feat(native): enrich analysis inputs natively behind the preview engine - #1055
Merged
Merged
Conversation
kvlonge
enabled auto-merge (squash)
October 9, 2026 04:38
The native model analysis session now re-analyses models with their known input shapes itself, deferring to Python only where Python's CTE fact recovery reads the parsed query. It also proves dynamic pivot contracts natively, inside the session and for models it does not analyse, deferring on parse errors and non-ASCII names.
kvlonge
force-pushed
the
feat/native-model-analysis-enrichment
branch
from
October 9, 2026 06:05
ad9a6d6 to
a86b008
Compare
…lysis-enrichment # Conflicts: # tests/e2e/scripts/compiler_differential/test_compiler_differential.py
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
Preview still called the wheel for input enrichment and pivot proofs; both move native.
Changes
analyze_querywith Python's projection and lineage. It defers wherever Python leaves its fast path: CTE fact recovery, NULL filters, normalisation or analysis failure, non-select shapes, casts with no upstream column, non-ASCII function names.dynamic_pivot).metadata_checksdeferrals, asinput_enrichmentno longer occurs.Test expectations added (parity test):
input_enrichmentdeferrals <= 120 (now 104): every-enrichment-defers fails.--selectanalysis is proven natively, with no wheel call.Sabotage, run and reverted: deleting the CTE check gives 3 mismatches; all native enrichments deferring gives 495 deferrals; a monkeypatched native session gives 0 native enrichments; a monkeypatched native pivot proof hits the wheel.
Verification
cargo test --workspace --all-features, clippy, fmt (1.99.0) before the rebase.make compiler-differential(CI flags): 302 identical, enrichment anddynamic_pivotwheel sites 0, 12legacy_analysisdeferrals.-shipped: 293 identical.tests/e2e/scripts/compiler_differentialpasses.make check-ci,make test, hygiene.Residuals: