EMPTY_ARRAY, pos| Constructor and Description |
|---|
SqlCase(SqlParserPos pos,
@Nullable SqlNode value,
SqlNodeList whenList,
SqlNodeList thenList,
@Nullable SqlNode elseExpr)
Creates a SqlCase expression.
|
| Modifier and Type | Method and Description |
|---|---|
static SqlCase |
createSwitched(SqlParserPos pos,
@Nullable SqlNode value,
SqlNodeList whenList,
SqlNodeList thenList,
@Nullable SqlNode elseClause)
Creates a call to the switched form of the CASE operator.
|
@Nullable SqlNode |
getElseOperand() |
SqlKind |
getKind()
Returns the type of node this is, or
SqlKind.OTHER if it's nothing special. |
List<SqlNode> |
getOperandList()
Returns the list of operands.
|
SqlOperator |
getOperator() |
SqlNodeList |
getThenOperands() |
@Nullable SqlNode |
getValueOperand() |
SqlNodeList |
getWhenOperands() |
void |
setOperand(int i,
@Nullable SqlNode operand)
Changes the value of an operand.
|
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getMonotonicity, isCountStar, isExpanded, operand, operandCount, unparse, validateclone, clone, cloneArray, equalDeep, equalDeep, equalsDeep, getParserPosition, isA, toList, toList, toSqlString, toSqlString, toSqlString, toString, unparseWithParentheses, validateExprpublic SqlCase(SqlParserPos pos, @Nullable SqlNode value, SqlNodeList whenList, SqlNodeList thenList, @Nullable SqlNode elseExpr)
pos - Parser positionvalue - The value (null for boolean case)whenList - List of all WHEN expressionsthenList - List of all THEN expressionselseExpr - The implicit or explicit ELSE expressionpublic static SqlCase createSwitched(SqlParserPos pos, @Nullable SqlNode value, SqlNodeList whenList, SqlNodeList thenList, @Nullable SqlNode elseClause)
CASE value
WHEN whenList[0] THEN thenList[0]
WHEN whenList[1] THEN thenList[1]
...
ELSE elseClause
ENDpublic SqlKind getKind()
SqlNodeSqlKind.OTHER if it's nothing special.getKind in class SqlCallSqlKind value, never nullSqlNode.isA(java.util.Set<org.apache.calcite.sql.SqlKind>)public SqlOperator getOperator()
getOperator in class SqlCallpublic List<SqlNode> getOperandList()
SqlCallNote: the proper type would be List<@Nullable SqlNode>, however,
it would trigger too many changes to the current codebase.
getOperandList in class SqlCallpublic void setOperand(int i,
@Nullable SqlNode operand)
SqlCallSqlValidator; use sparingly.setOperand in class SqlCalli - Operand indexoperand - Operand valuepublic @Nullable SqlNode getValueOperand()
public SqlNodeList getWhenOperands()
public SqlNodeList getThenOperands()
public @Nullable SqlNode getElseOperand()
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.