Class SetOp

  • All Implemented Interfaces:
    java.lang.Cloneable, RelOptNode, RelNode
    Direct Known Subclasses:
    Intersect, Minus, Union

    public abstract class SetOp
    extends AbstractRelNode
    SetOp is an abstract base for relational set operators such as UNION, MINUS (aka EXCEPT), and INTERSECT.
    • Field Detail

      • inputs

        protected com.google.common.collect.ImmutableList<RelNode> inputs
      • all

        public final boolean all
    • Constructor Detail

      • SetOp

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

      • copy

        public SetOp 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
      • 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
      • 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
      • isHomogeneous

        public boolean isHomogeneous​(boolean compareNames)
        Returns whether all the inputs of this set operator have the same row type as its output row.
        Parameters:
        compareNames - Whether column names are important in the homogeneity comparison
        Returns:
        Whether all the inputs of this set operator have the same row type as its output row