- Record Components:
input- the source relation whose lineage is reified; must not be nulllocation- the source location of this node; never null
- All Implemented Interfaces:
RelNode
input as queryable data.
WHY(R) is a self-terminating reification boundary. Below it
the lineage semiring threads exactly as on today's provenance side-channel; at
it each result tuple's lineage polynomial is frozen into one added nested
column; above it the value is inert data that ordinary σ/π/μ
views slice. It is therefore not the rejected always-on annotation
column — nothing above WHY is re-threaded.
Output schema: input columns ⊕ provenance:ANY, where the appended
provenance column holds the tuple's polynomial as a faithful two-level
document: [{coefficient, variables:[{relation, ordinal, columns}]}] —
one array element per monomial (distinct derivation), one variables
element per contributing base-tuple occurrence.
Evaluation reuses the existing lineage K-relation path
(ProvenanceEvaluator over the polynomial semiring) — no new evaluation
concepts. The canonical K-relation must be built before output, so the operator
is blocking (MaterializationMode.BAG), and it is a hard optimizer
barrier that never pushes down.
Surface syntax: WHY (R) (ASCII) or ω (R) (glyph).
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe reserved name of the appended provenance column (provenance). -
Constructor Summary
ConstructorsConstructorDescriptionConvenience constructor for tests; usesSourceLocation.UNKNOWN.WhyNode(RelNode input, SourceLocation location) Creates an instance of aWhyNoderecord class. -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(RelNodeVisitor<R> visitor) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.location()Returns the value of thelocationrecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.darkcollective.relix.ast.RelNode
children, mapChildren, materializationMode, prettyPrint
-
Field Details
-
PROVENANCE_COLUMN
The reserved name of the appended provenance column (provenance). The reification adds one column of this name at typeANY; a clash with an existing input column is a validation error — there is noρ-style rename escape hatch.- See Also:
-
-
Constructor Details
-
WhyNode
Creates an instance of aWhyNoderecord class. -
WhyNode
Convenience constructor for tests; usesSourceLocation.UNKNOWN.
-
-
Method Details
-
accept
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
input
Returns the value of theinputrecord component.- Returns:
- the value of the
inputrecord component
-
location
Returns the value of thelocationrecord component.
-