feat(relations): cross-family coercion for derived DAG dependency refs - #288
Merged
discreteds merged 4 commits intoAug 15, 2026
Merged
Conversation
… coercion A derived ref with an inline foreign ReadRelNode (relation(pandas).filter()) is left on the anchor pair and raises TypeError from the Polars anchor's read(). Deliberately red -- the next task rewrites _compile_with_refs's dependency loop. Item 97. Design: mountainash-central 2026-08-14-dag-cross-family-derived-dependency-coercion-design.md
…n in RelationDAG Replace the single anchor-normalized cache with a canonical cache (each ref materialised once in its own family, stored as (value, family, dialect)) plus a ref_resolver that coerces cross-family (and narwhals cross-dialect) values to the consumer's family via item 94's _coerce_to_match. Same-family-same-dialect refs still reuse the anchor's objects; the per-ref key_context swap and once-after-loop anchor restore are preserved. The lazy-narwhals-anchor upfront guard is broadened to catch derived (not just bare) foreign refs. Item 97. Design: mountainash-central 2026-08-14-dag-cross-family-derived-dependency-coercion-design.md
…ries Broaden item 92's upfront lazy-anchor rejection (order-independent) to catch ANY foreign-family ref -- bare or derived -- not just a bare ReadRelNode root, and pin the project-root, transitive-chain, and no-leaf-ref (key_context preserved) cases.
Under item 97, a derived foreign dependency now coerces and succeeds, so item 92's pinned 'raises TypeError' boundary is superseded.
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.
Implements item 97. Design: mountainash-central 2026-08-14-dag-cross-family-derived-dependency-coercion-design.md (Revision 6).