Repository navigation
feat(core-spec): make relationship cardinality explicit - #794
Open
christianeu-db wants to merge 1 commit into
Open
christianeu-db wants to merge 1 commit into
christianeu-db wants to merge 1 commit into
Conversation
christianeu-db
force-pushed
the
relationship-cardinality
branch
from
November 22, 2026 06:45
f3c0012 to
13813a0
Compare
A relationship may declare `cardinality`: ManyToOne, OneToMany, or OneToOne, stated from `from` to `to`. An absent value means ManyToOne, so existing documents keep their meaning. There is no many-to-many value. Layer 2 semantics are unchanged; its mapping text now maps `cardinality`. Layer 3 paths follow every step that does not increase granularity: from `from` to `to` for ManyToOne and OneToOne, and from `to` to `from` for OneToMany and OneToOne. Filter propagation stays out of scope. The validator checks key coverage on each one side of the cardinality. The schema, spec.yaml, the spec type generator, and the Python SDK gain the Cardinality enum. Discussion: https://lists.apache.org/thread/1kggjhy5tjqjyvlf6rsvs9ygxt6x9zkr Co-authored-by: Isaac <no-reply@databricks.com>
christianeu-db
force-pushed
the
relationship-cardinality
branch
from
November 22, 2026 06:47
13813a0 to
d6267ef
Compare
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.
Summary
A relationship may declare
cardinality: ManyToOne, OneToMany, or OneToOne, stated fromfromtoto. An absent value means ManyToOne, so existing documents keep their meaning. There is no many-to-many value.Layer 2 semantics are unchanged; its mapping text now maps
cardinality. Layer 3 paths follow every step that does not increase granularity: fromfromtotofor ManyToOne and OneToOne, and fromtotofromfor OneToMany and OneToOne. Filter propagation stays out of scope.The validator checks key coverage on each one side of the cardinality. The schema, spec.yaml, the spec type generator, and the Python SDK gain the Cardinality enum.
Discussion: https://lists.apache.org/thread/1kggjhy5tjqjyvlf6rsvs9ygxt6x9zkr
Related Issues
#50
Checklist
Specification
core-spec/and follow the existing structure[DISCUSS]thread ondev@with a stated end date, and reach lazy consensus (or pass a[VOTE]) before mergedocs/spec_changes.mdrecords rationale, compatibility and migration impact, or the PR explains why no entry is neededValidation
validation/are updated if the spec changedDocumentation
docs/is updated to reflect any user-facing changesTests
pytest/ CI green)Compliance
NOTICEand/orLICENSEhave been updated per ASF policy