Class JoinInfo

java.lang.Object
org.apache.calcite.rel.core.JoinInfo

public class JoinInfo extends Object
An analyzed join condition.

It is useful for the many algorithms that care whether a join has an equi-join condition.

You can create one using createWithStrictEquality(org.apache.calcite.rel.RelNode, org.apache.calcite.rel.RelNode, org.apache.calcite.rex.RexNode), or call Join.analyzeCondition(); many kinds of join cache their join info, especially those that are equi-joins.

See Also:
  • Field Details

    • leftKeys

      public final ImmutableIntList leftKeys
    • rightKeys

      public final ImmutableIntList rightKeys
    • nonEquiConditions

      public final com.google.common.collect.ImmutableList<RexNode> nonEquiConditions
  • Constructor Details

  • Method Details

    • of

      public static JoinInfo of(RelNode left, RelNode right, RexNode condition)
      Creates a JoinInfo by analyzing a condition.
    • createWithStrictEquality

      public static JoinInfo createWithStrictEquality(RelNode left, RelNode right, RexNode condition)
      Creates a JoinInfo by analyzing a condition. A JoinInfo created using this method only considers EQUALS operations equi-conditions; in contrast IS_NOT_DISTINCT_FROM operations are NOT considered equalities; they are inserted in the nonEquiList.
    • of

      public static JoinInfo of(ImmutableIntList leftKeys, ImmutableIntList rightKeys)
      Creates an equi-join.
    • isEqui

      public boolean isEqui()
      Returns whether this is an equi-join.
    • pairs

      public List<IntPair> pairs()
      Returns a list of (left, right) key ordinals.
    • leftSet

      public ImmutableBitSet leftSet()
    • rightSet

      public ImmutableBitSet rightSet()
    • getRemaining

      @Deprecated public RexNode getRemaining(RexBuilder rexBuilder)
      Deprecated.
    • getEquiCondition

      public RexNode getEquiCondition(RelNode left, RelNode right, RexBuilder rexBuilder)
    • keys

      public List<ImmutableIntList> keys()