Skip to content

feat(relations): cross-family coercion for derived DAG dependency refs - #288

Merged
discreteds merged 4 commits into
developfrom
feature/dag-cross-family-derived-dependency-coercion
Aug 15, 2026
Merged

feat(relations): cross-family coercion for derived DAG dependency refs#288
discreteds merged 4 commits into
developfrom
feature/dag-cross-family-derived-dependency-coercion

Conversation

@discreteds

Copy link
Copy Markdown
Member

Implements item 97. Design: mountainash-central 2026-08-14-dag-cross-family-derived-dependency-coercion-design.md (Revision 6).

… 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.
@discreteds
discreteds merged commit 04b047f into develop Aug 15, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant