core/src/main/java/org/apache/calcite/sql2rel/RelFieldTrimmer.java
/**
   * Visit method, per {@link org.apache.calcite.util.ReflectiveVisitor}.
   *
   * <p>This method is invoked reflectively, so there may not be any apparent
   * calls to it. The class (or derived classes) may contain overloads of
   * this method with more specific types for the {@code rel} parameter.
   *
   * <p>Returns a pair: the relational expression created, and the mapping
   * between the original fields and the fields of the newly created
   * relational expression.
   *
   * @param rel        Relational expression
   * @param fieldsUsed Fields needed by the consumer
   * @return relational expression and mapping
   */


Returns a pair: the relational expression created, and the mapping
between the original fields and the fields of the newly created
relational expression.

@param rel        Relational expression
@param fieldsUsed Fields needed by the consumer
@return relational expression and mapping
Returns a pair : the relational expression created and the mapping between the original fields and the fields of the newly created relational expression . @param rel Relational expression @param fieldsUsed Fields needed by the consumer @return relational expression and mapping
public TrimResult trimFields(
      RelNode rel,
      ImmutableBitSet fieldsUsed,
      Set<RelDataTypeField> extraFields) {
    Util.discard(fieldsUsed);
    return new TrimResult(
        rel,
        Mappings.createIdentity(
            rel.getRowType().getFieldCount()));
  }
public TrimResult trimFields ( RelNode rel , ImmutableBitSet fieldsUsed , Set < RelDataTypeField > extraFields ) { Util . discard ( fieldsUsed ) ; return new TrimResult ( rel , Mappings . createIdentity ( rel . getRowType ( ) . getFieldCount ( ) ) ) ; }
Visit method, per {@link org.apache.calcite.util.ReflectiveVisitor}.
Visit method per { @link org . apache . calcite . util . ReflectiveVisitor } .
// We don't know how to trim this kind of relational expression, so give // it back intact.