Package org.apache.calcite.rel.metadata
Interface BuiltInMetadata.ExpressionLineage
- All Superinterfaces:
Metadata
- Enclosing class:
BuiltInMetadata
Metadata about the origins of expressions.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
Handler API. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetExpressionLineage
(RexNode expression) Given the input expression applied on the givenRelNode
, this provider returns the expression with its lineage resolved.
-
Field Details
-
DEF
-
-
Method Details
-
getExpressionLineage
Given the input expression applied on the givenRelNode
, this provider returns the expression with its lineage resolved.In particular, the result will be a set of nodes which might contain references to columns in TableScan operators (
RexTableInputRef
). An expression can have more than one lineage expression due to Union operators. However, we do not check column equality in Filter predicates. Each TableScan operator below the node is identified uniquely by its qualified name and its entity number.For example, if the expression is
$0 + 2
and$0
originated from column$3
in the0
occurrence of tableA
in the plan, result will be:A.#0.$3 + 2
. Occurrences are generated in no particular order, but it is guaranteed that if two expressions referred to the same table, the qualified name + occurrence will be the same.- Parameters:
expression
- expression whose lineage we want to resolve- Returns:
- set of expressions with lineage resolved, or null if this information
cannot be determined (e.g. origin of an expression is an aggregation
in an
Aggregate
operator)
-