Skip to content

Commit a15a396

Browse files
committed
Clarify dj.U conceptual framing
dj.U represents the universal set of all possible values AND lineages. Its attributes are homologous to any namesake as a natural consequence of containing all lineages, not by bypassing the lineage check.
1 parent db3931e commit a15a396

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/SPEC-semantic-matching.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ Note: `A - B` is the negated form of restriction (equivalent to `A & ~B`), not a
112112

113113
### Universal Set `dj.U`
114114

115-
`dj.U(attr1, ..., attrn)` represents the universal set of all possible values for the specified attributes. It has special semantics:
115+
`dj.U(attr1, ..., attrn)` represents the universal set of all possible values and lineages for the specified attributes.
116116

117-
**Homology**: Attributes of `dj.U` are considered **homologous to any namesake attribute**. This is a special case where lineage matching is bypassed.
117+
**Homology**: Since `dj.U` contains all possible lineages, its attributes are **homologous to any namesake attribute**. This is not bypassing the lineage check—it's a natural consequence of `dj.U` being the universal set.
118118

119119
**Valid operations**:
120120

@@ -748,9 +748,9 @@ WHERE c.contype = 'f'
748748

749749
### D10: Universal Set `dj.U` Semantics
750750

751-
**Decision**: `dj.U` attributes are homologous to any namesake. Deprecate join (`*`) on `dj.U`.
751+
**Decision**: `dj.U` represents all possible values and lineages. Deprecate join (`*`) on `dj.U`.
752752

753-
**Homology rule**: Attributes of `dj.U` bypass lineage checking — they match any namesake attribute.
753+
**Homology rule**: Since `dj.U` contains all lineages, its attributes are homologous to any namesake.
754754

755755
**Valid operations**:
756756
- `dj.U('a', 'b') & A` — promotes a, b to PK; lineage transferred from A
@@ -808,7 +808,7 @@ Semantic matching is a significant change to DataJoint's join semantics that imp
808808
| **D7**: Migration | Utility function + automatic fallback computation |
809809
| **D8**: PK formation | Functional dependency analysis; left operand wins ties; non-commutative |
810810
| **D9**: Aggregation | B must contain A's entire PK; result PK = PK(A); applies to `keep_all_rows=True` too |
811-
| **D10**: `dj.U` semantics | Homologous to any namesake; deprecate `*`, use `&` for PK promotion |
811+
| **D10**: `dj.U` semantics | Universal set contains all lineages; deprecate `*`, use `&` for PK promotion |
812812

813813
### Compatibility
814814

0 commit comments

Comments
 (0)