Class Join

    • Constructor Detail

      • Join

        protected Join​(RelOptCluster cluster,
                       RelTraitSet traitSet,
                       RelNode left,
                       RelNode right,
                       RexNode condition,
                       java.util.Set<CorrelationId> variablesSet,
                       JoinRelType joinType)
        Creates a Join.

        Note: We plan to change the variablesStopped parameter to Set&lt;CorrelationId&gt; variablesSet before version 2.0, because getVariablesSet() is preferred over AbstractRelNode.getVariablesStopped(). This constructor is not deprecated, for now, because maintaining overloaded constructors in multiple sub-classes would be onerous.

        cluster - Cluster
        traitSet - Trait set
        left - Left input
        right - Right input
        condition - Join condition
        joinType - Join type
        variablesSet - Set variables that are set by the LHS and used by the RHS and are not available to nodes above this Join in the tree
    • Method Detail

      • 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
        getChildExps in class AbstractRelNode
        List of this relational expression's child expressions
        See Also:
      • 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.
        Specified by:
        accept in interface RelNode
        accept in class AbstractRelNode
        shuttle - Shuttle
        A copy of this node incorporating changes made by the shuttle to this node's children
      • getCondition

        public RexNode getCondition()
      • isValid

        public boolean isValid​(Litmus litmus,
                               RelNode.Context context)
        Description copied from interface: RelNode
        Returns whether this relational expression is valid.

        If assertions are enabled, this method is typically called with litmus = THROW, as follows:

        assert rel.isValid(Litmus.THROW)

        This signals that the method can throw an AssertionError if it is not valid.

        Specified by:
        isValid in interface RelNode
        isValid in class AbstractRelNode
        litmus - What to do if invalid
        context - Context for validity checking
        Whether relational expression is valid
      • getVariablesSet

        public java.util.Set<CorrelationId> getVariablesSet()
        Description copied from interface: RelNode
        Returns the variables that are set in this relational expression but also used and therefore not available to parents of this relational expression.

        Note: only Correlate should set variables.

        Specified by:
        getVariablesSet in interface RelNode
        getVariablesSet in class AbstractRelNode
        Names of variables which are set in this relational expression
      • isSemiJoinDone

        public boolean isSemiJoinDone()
        Returns whether this LogicalJoin has already spawned a SemiJoin via JoinAddRedundantSemiJoinRule.

        The base implementation returns false.

        whether this join has already spawned a semi join
      • isSemiJoin

        public boolean isSemiJoin()
        Returns whether this Join is a semijoin.
        true if this Join's join type is semi.
      • getSystemFieldList

        public java.util.List<RelDataTypeField> getSystemFieldList()
        Returns a list of system fields that will be prefixed to output row type.
        list of system fields
      • copy

        public final Join 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
        copy in class AbstractRelNode
        traitSet - Trait set
        inputs - Inputs
        Copy of this relational expression, substituting traits and inputs
      • analyzeCondition

        public JoinInfo analyzeCondition()
        Analyzes the join condition.
        Analyzed join condition