Class RelMdInputFieldsUsed

java.lang.Object
org.apache.calcite.rel.metadata.RelMdInputFieldsUsed
All Implemented Interfaces:
MetadataHandler<BuiltInMetadata.InputFieldsUsed>

public class RelMdInputFieldsUsed extends Object implements MetadataHandler<BuiltInMetadata.InputFieldsUsed>
Metadata provider to determine which input fields are used by a RelNode.

A field is considered "used" if it is referenced by the relational expression. The result is an ImmutableBitSet where bits correspond to input column ordinals.

Examples:

  • For an Aggregate, "used" fields are those in the group set or referenced in aggregate functions. see RelOptUtil.getAllFields(org.apache.calcite.rel.core.Aggregate)
  • For a Join, it is the union of "used" fields from both inputs (shifted appropriately for the right input). For SEMI and ANTI joins, fields from the right input are not considered "used" as they are not projected to the output
See Also: