Interface BuiltInMetadata.ExpressionLineage

All Superinterfaces:
Metadata
Enclosing class:
BuiltInMetadata

public static interface BuiltInMetadata.ExpressionLineage extends Metadata
Metadata about the origins of expressions.
  • Field Details

  • Method Details

    • getExpressionLineage

      @Nullable Set<RexNode> getExpressionLineage(RexNode expression)
      Given the input expression applied on the given RelNode, 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 the 0 occurrence of table A 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)