Class TableFunctionScan

    • Field Detail

      • rexCall

        private final RexNode rexCall
      • elementType

        private final java.lang.reflect.Type elementType
      • inputs

        private com.google.common.collect.ImmutableList<RelNode> inputs
      • columnMappings

        protected final com.google.common.collect.ImmutableSet<RelColumnMapping> columnMappings
    • Constructor Detail

      • TableFunctionScan

        protected TableFunctionScan​(RelOptCluster cluster,
                                    RelTraitSet traitSet,
                                    java.util.List<RelNode> inputs,
                                    RexNode rexCall,
                                    java.lang.reflect.Type elementType,
                                    RelDataType rowType,
                                    java.util.Set<RelColumnMapping> columnMappings)
        Creates a TableFunctionScan.
        Parameters:
        cluster - Cluster that this relational expression belongs to
        inputs - 0 or more relational inputs
        traitSet - Trait set
        rexCall - Function invocation expression
        elementType - Element type of the collection that will implement this table
        rowType - Row type produced by function
        columnMappings - Column mappings associated with this function
      • TableFunctionScan

        protected TableFunctionScan​(RelInput input)
        Creates a TableFunctionScan by parsing serialized output.
    • Method Detail

      • copy

        public final TableFunctionScan copy​(RelTraitSet traitSet,
                                            java.util.List<RelNode> inputs)
        Description copied from interface: RelNode
        Creates a copy of this relational expression, perhaps changing traits and inputs.

        Sub-classes with other important attributes are encouraged to create variants of this method with more parameters.

        Specified by:
        copy in interface RelNode
        Overrides:
        copy in class AbstractRelNode
        Parameters:
        traitSet - Trait set
        inputs - Inputs
        Returns:
        Copy of this relational expression, substituting traits and inputs
      • copy

        public abstract TableFunctionScan copy​(RelTraitSet traitSet,
                                               java.util.List<RelNode> inputs,
                                               RexNode rexCall,
                                               java.lang.reflect.Type elementType,
                                               RelDataType rowType,
                                               java.util.Set<RelColumnMapping> columnMappings)
        Copies this relational expression, substituting traits and inputs.
        Parameters:
        traitSet - Traits
        inputs - 0 or more relational inputs
        rexCall - Function invocation expression
        elementType - Element type of the collection that will implement this table
        rowType - Row type produced by function
        columnMappings - Column mappings associated with this function
        Returns:
        Copy of this relational expression, substituting traits and inputs
      • getInputs

        public java.util.List<RelNode> getInputs()
        Description copied from interface: RelNode
        Returns an array of this relational expression's inputs. If there are no inputs, returns an empty list, not null.
        Specified by:
        getInputs in interface RelNode
        Specified by:
        getInputs in interface RelOptNode
        Overrides:
        getInputs in class AbstractRelNode
        Returns:
        Array of this relational expression's inputs
      • getChildExps

        public java.util.List<RexNode> getChildExps()
        Description copied from interface: RelNode
        Returns a list of this relational expression's child expressions. (These are scalar expressions, and so do not include the relational inputs that are returned by RelNode.getInputs().

        The caller should treat the list as unmodifiable; typical implementations will return an immutable list. If there are no child expressions, returns an empty list, not null.

        Specified by:
        getChildExps in interface RelNode
        Overrides:
        getChildExps in class AbstractRelNode
        Returns:
        List of this relational expression's child expressions
        See Also:
        RelNode.accept(org.apache.calcite.rex.RexShuttle)
      • accept

        public RelNode accept​(RexShuttle shuttle)
        Description copied from interface: RelNode
        Accepts a visit from a shuttle. If the shuttle updates expression, then a copy of the relation should be created. This new relation might have a different row-type.
        Specified by:
        accept in interface RelNode
        Overrides:
        accept in class AbstractRelNode
        Parameters:
        shuttle - Shuttle
        Returns:
        A copy of this node incorporating changes made by the shuttle to this node's children
      • replaceInput

        public void replaceInput​(int ordinalInParent,
                                 RelNode p)
        Description copied from interface: RelNode
        Replaces the ordinalInParentth input. You must override this method if you override RelNode.getInputs().
        Specified by:
        replaceInput in interface RelNode
        Overrides:
        replaceInput in class AbstractRelNode
        Parameters:
        ordinalInParent - Position of the child input, 0 is the first
        p - New node that should be put at position ordinalInParent
      • getCall

        public RexNode getCall()
        Returns function invocation expression.

        Within this rexCall, instances of RexInputRef refer to entire input RelNodes rather than their fields.

        Returns:
        function invocation expression
      • getColumnMappings

        public java.util.Set<RelColumnMapping> getColumnMappings()
        Returns set of mappings known for this table function, or null if unknown (not the same as empty!).
        Returns:
        set of mappings known for this table function, or null if unknown (not the same as empty!)
      • getElementType

        public java.lang.reflect.Type getElementType()
        Returns element type of the collection that will implement this table.
        Returns:
        element type of the collection that will implement this table