feat(relations): coerce bare cross-family DAG dependency refs (item 92) - #284
Merged
Conversation
A DAG target anchored on family X that joins a BARE foreign-family dependency ref now compiles the ref in its own family and coerces the result to the anchor's family via _coerce_to_match (item 94), instead of leaving the ref on the anchor pair to fail in read(). - _anchor_prototype(family, dialect) + _is_lazy_narwhals helpers - _resolve_identity_leaf(name) -> (family, dialect, ReadRelNode) - foreign branch: bare ReadRelNode -> compile own family + coerce; derived root stays on the anchor pair (item 97's territory) - upfront lazy-narwhals-anchor guard (order-independent rejection) Design: mountainash-central 2026-08-14-dag-cross-family-bare-dependency-coercion.md (Rev 5)
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 backlog item 92 — RelationDAG cross-family bare-dependency coercion.
A DAG target anchored on one family that joins a BARE foreign-family dependency ref now compiles the ref in its own family and coerces the result to the anchor's family via
_coerce_to_match(item 94), instead of leaving the ref on the anchor pair to fail raw inread().Changes
_anchor_prototype(family, dialect)+_is_lazy_narwhalsmodule helpers_resolve_identity_leaf(name)→(family, dialect, ReadRelNode)ReadRelNoderoot → compile own family + coerce + restore; derived root stays on the anchor pair (item 97's territory)Tests:
tests/relations/dag/test_dag_cross_family_bare.py(acceptance + Ibis/narwhals-anchor matrix + derived-non-rescue boundary); updatedTestExplicitBackendPerRefNeverBuildsInvalidHybridto the new own-family-compile semantics.Full suite: 22250 passed, 0 failed. Ruff clean. (mypy baseline has pre-existing
import-untyped/capability_census errors, unchanged.)Design: mountainash-central
2026-08-14-dag-cross-family-bare-dependency-coercion.md(Revision 5).