Enum JoinType

java.lang.Object
java.lang.Enum<JoinType>
org.apache.calcite.linq4j.JoinType
All Implemented Interfaces:
Serializable, Comparable<JoinType>, Constable

public enum JoinType extends Enum<JoinType>
Enumeration of join types.
  • Enum Constant Details

    • INNER

      public static final JoinType INNER
      Inner join.
    • LEFT

      public static final JoinType LEFT
      Left-outer join.
    • FULL

      public static final JoinType FULL
      Full-outer join.
    • SEMI

      public static final JoinType SEMI
      Semi-join.

      For example, EMP semi-join DEPT finds all EMP records that have a corresponding DEPT record:

       SELECT * FROM EMP
       WHERE EXISTS (SELECT 1 FROM DEPT
           WHERE DEPT.DEPTNO = EMP.DEPTNO)
    • ANTI

      public static final JoinType ANTI
      Anti-join (also known as Anti-semi-join).

      For example, EMP anti-join DEPT finds all EMP records that do not have a corresponding DEPT record:

       SELECT * FROM EMP
       WHERE NOT EXISTS (SELECT 1 FROM DEPT
           WHERE DEPT.DEPTNO = EMP.DEPTNO)
    • ASOF

      public static final JoinType ASOF
      An ASOF JOIN operation combines rows from two tables based on comparable timestamp values. For each row in the left table, the join finds at most one row in the right table that has the "closest" timestamp value. The matched row on the right side is the closest match, which could less than or equal or greater than or equal in the timestamp column, as specified by the comparison operator.

      Example:

       FROM left_table ASOF JOIN right_table
         MATCH_CONDITION ( left_table.timecol ≤ right_table.timecol )
         ON left_table.col = right_table.col
    • LEFT_ASOF

      public static final JoinType LEFT_ASOF
      The left version of an ASOF join, where each row from the left table is part of the output.
  • Method Details

    • values

      public static JoinType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static JoinType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null
    • generatesNullsOnRight

      public boolean generatesNullsOnRight()
      Returns whether a join of this type may generate NULL values on the right-hand side.
    • generatesNullsOnLeft

      public boolean generatesNullsOnLeft()
      Returns whether a join of this type may generate NULL values on the left-hand side.