public final class CanonicalLineageEdge extends Object
Identity is over four fields:
role — EdgeRole.outputName — the outer-query output column the edge belongs
to. Always non-null for EdgeRole.SELECT; always null for
EdgeRole.FILTER and EdgeRole.JOIN. The null-anchor
is what makes the SELECT and FILTER/JOIN sets disjoint by
construction without a string sentinel that could collide with a
legitimate alias (see slice-7 plan, "Row-influence: typed
null-output anchor").baseTable — resolved base-table qualified name (lower-cased).baseColumn — column on that base table (lower-cased).Aggregate-ness is not part of edge identity — it lives in
CanonicalLineageModel.getAggregateByOutput(). Encoding it on the
edge would mean COUNT(*) outputs (which produce zero edges) could
vanish entirely from the model, and would break Java equality semantics
for sets of edges.
semanticRole (US-010) is likewise not part of identity:
it is the fine-grained role from the lineage2 contract §5 taxonomy
(DIRECT/TRANSFORM/FILTER/JOIN/AGGREGATE/DERIVED/CONDITION/LOOKUP/UNKNOWN),
carried for the DivergenceClass.ROLE_MISMATCH comparison pass.
Null when the producing projector has no role information (the slice-7
projectors). Keeping it out of equals/hashCode means a role disagreement
still identity-matches and is reported as ROLE_MISMATCH instead of a
missing+extra pair.
| Modifier and Type | Field and Description |
|---|---|
static Comparator<CanonicalLineageEdge> |
ORDER
Total ordering used everywhere a deterministic edge sequence is needed.
|
| Constructor and Description |
|---|
CanonicalLineageEdge(EdgeRole role,
String outputName,
String baseTable,
String baseColumn) |
CanonicalLineageEdge(EdgeRole role,
String outputName,
String baseTable,
String baseColumn,
String semanticRole) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
String |
getBaseColumn() |
String |
getBaseTable() |
String |
getOutputName()
Non-null for SELECT, null for FILTER/JOIN.
|
EdgeRole |
getRole() |
String |
getSemanticRole()
Fine-grained lineage2 contract role (uppercase, §5 taxonomy), or null
when the producing projector carries no role information.
|
int |
hashCode() |
String |
toString() |
public static final Comparator<CanonicalLineageEdge> ORDER
public CanonicalLineageEdge(EdgeRole role, String outputName, String baseTable, String baseColumn)
public String getOutputName()
public String getBaseTable()
public String getBaseColumn()
public String getSemanticRole()