Package org.apache.calcite.sql
Class SqlJoin
- java.lang.Object
-
- org.apache.calcite.sql.SqlNode
-
- org.apache.calcite.sql.SqlCall
-
- org.apache.calcite.sql.SqlJoin
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SqlJoin extends SqlCall
Parse tree node representing aJOIN
clause.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SqlJoin.SqlJoinOperator
SqlJoinOperator
describes the syntax of the SQLJOIN
operator.
-
Field Summary
Fields Modifier and Type Field Description (package private) SqlNode
condition
(package private) SqlLiteral
conditionType
Value must be aSqlLiteral
, one of the integer codes forJoinConditionType
.(package private) SqlLiteral
joinType
Value must be aSqlLiteral
, one of the integer codes forJoinType
.(package private) SqlNode
left
(package private) SqlLiteral
natural
Operand says whether this is a natural join.static SqlJoin.SqlJoinOperator
OPERATOR
(package private) SqlNode
right
-
Fields inherited from class org.apache.calcite.sql.SqlNode
EMPTY_ARRAY, pos
-
-
Constructor Summary
Constructors Constructor Description SqlJoin(SqlParserPos pos, SqlNode left, SqlLiteral natural, SqlLiteral joinType, SqlNode right, SqlLiteral conditionType, SqlNode condition)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlNode
getCondition()
JoinConditionType
getConditionType()
Returns aJoinConditionType
, never null.SqlLiteral
getConditionTypeNode()
JoinType
getJoinType()
Returns aJoinType
, never null.SqlLiteral
getJoinTypeNode()
SqlKind
getKind()
Returns the type of node this is, orSqlKind.OTHER
if it's nothing special.SqlNode
getLeft()
java.util.List<SqlNode>
getOperandList()
SqlOperator
getOperator()
SqlNode
getRight()
boolean
isNatural()
SqlLiteral
isNaturalNode()
void
setLeft(SqlNode left)
void
setOperand(int i, SqlNode operand)
Changes the value of an operand.void
setRight(SqlNode right)
-
Methods inherited from class org.apache.calcite.sql.SqlCall
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getMonotonicity, isCountStar, isExpanded, operand, operandCount, unparse, validate
-
Methods inherited from class org.apache.calcite.sql.SqlNode
clone, clone, cloneArray, equalDeep, equalDeep, equalsDeep, getParserPosition, isA, toSqlString, toSqlString, toString, validateExpr
-
-
-
-
Field Detail
-
OPERATOR
public static final SqlJoin.SqlJoinOperator OPERATOR
-
left
SqlNode left
-
natural
SqlLiteral natural
Operand says whether this is a natural join. Must be constant TRUE or FALSE.
-
joinType
SqlLiteral joinType
Value must be aSqlLiteral
, one of the integer codes forJoinType
.
-
right
SqlNode right
-
conditionType
SqlLiteral conditionType
Value must be aSqlLiteral
, one of the integer codes forJoinConditionType
.
-
condition
SqlNode condition
-
-
Constructor Detail
-
SqlJoin
public SqlJoin(SqlParserPos pos, SqlNode left, SqlLiteral natural, SqlLiteral joinType, SqlNode right, SqlLiteral conditionType, SqlNode condition)
-
-
Method Detail
-
getOperator
public SqlOperator getOperator()
- Specified by:
getOperator
in classSqlCall
-
getKind
public SqlKind getKind()
Description copied from class:SqlNode
Returns the type of node this is, orSqlKind.OTHER
if it's nothing special.- Overrides:
getKind
in classSqlCall
- Returns:
- a
SqlKind
value, never null - See Also:
SqlNode.isA(java.util.Set<org.apache.calcite.sql.SqlKind>)
-
getOperandList
public java.util.List<SqlNode> getOperandList()
- Specified by:
getOperandList
in classSqlCall
-
setOperand
public void setOperand(int i, SqlNode operand)
Description copied from class:SqlCall
Changes the value of an operand. Allows some rewrite bySqlValidator
; use sparingly.- Overrides:
setOperand
in classSqlCall
- Parameters:
i
- Operand indexoperand
- Operand value
-
getCondition
public final SqlNode getCondition()
-
getConditionType
public final JoinConditionType getConditionType()
Returns aJoinConditionType
, never null.
-
getConditionTypeNode
public SqlLiteral getConditionTypeNode()
-
getJoinTypeNode
public SqlLiteral getJoinTypeNode()
-
getLeft
public final SqlNode getLeft()
-
setLeft
public void setLeft(SqlNode left)
-
isNatural
public final boolean isNatural()
-
isNaturalNode
public final SqlLiteral isNaturalNode()
-
getRight
public final SqlNode getRight()
-
setRight
public void setRight(SqlNode right)
-
-