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:
Cloneable
- Direct Known Subclasses:
SqlAsofJoin
Parse tree node representing a
JOIN
clause.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Describes the syntax of the SQLJOIN
operator. -
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlNode
EMPTY_ARRAY, pos
-
Constructor Summary
ConstructorDescriptionSqlJoin
(SqlParserPos pos, SqlNode left, SqlLiteral natural, SqlLiteral joinType, SqlNode right, SqlLiteral conditionType, @Nullable SqlNode condition) -
Method Summary
Modifier and TypeMethodDescriptionfinal @Nullable SqlNode
final JoinConditionType
Returns aJoinConditionType
, never null.final JoinType
Returns aJoinType
, never null.getKind()
Returns the type of node this is, orSqlKind.OTHER
if it's nothing special.final SqlNode
getLeft()
Returns the list of operands.final SqlNode
getRight()
final boolean
final SqlLiteral
void
void
setOperand
(int i, @Nullable SqlNode operand) Changes the value of an operand.void
toSqlString
(UnaryOperator<SqlWriterConfig> transform) Returns the SQL text of the tree of which thisSqlNode
is the root.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, toList, toList, toSqlString, toSqlString, toString, unparseWithParentheses, validateExpr
-
Field Details
-
OPERATOR
-
-
Constructor Details
-
SqlJoin
public SqlJoin(SqlParserPos pos, SqlNode left, SqlLiteral natural, SqlLiteral joinType, SqlNode right, SqlLiteral conditionType, @Nullable SqlNode condition)
-
-
Method Details
-
getOperator
- Specified by:
getOperator
in classSqlCall
-
getKind
Description copied from class:SqlNode
Returns the type of node this is, orSqlKind.OTHER
if it's nothing special. -
getOperandList
Description copied from class:SqlCall
Returns the list of operands. The set and order of operands is call-specific.Note: the proper type would be
List<@Nullable SqlNode>
, however, it would trigger too many changes to the current codebase.- Specified by:
getOperandList
in classSqlCall
- Returns:
- the list of call operands, never null, the operands can be null
-
setOperand
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
-
getConditionType
Returns aJoinConditionType
, never null. -
getConditionTypeNode
-
getJoinType
Returns aJoinType
, never null. -
getJoinTypeNode
-
getLeft
-
setLeft
-
isNatural
public final boolean isNatural() -
isNaturalNode
-
getRight
-
setRight
-
toSqlString
Description copied from class:SqlNode
Returns the SQL text of the tree of which thisSqlNode
is the root.Typical return values are:
- 'It''s a bird!'
- NULL
- 12.3
- DATE '1969-04-29'
- Overrides:
toSqlString
in classSqlNode
- Parameters:
transform
- Transform that sets desired writer configuration
-