Package org.apache.calcite.sql
Class SqlBasicCall
java.lang.Object
org.apache.calcite.sql.SqlNode
org.apache.calcite.sql.SqlCall
org.apache.calcite.sql.SqlBasicCall
- All Implemented Interfaces:
Cloneable
Implementation of
SqlCall that keeps its operands in an array.-
Field Summary
Fields inherited from class org.apache.calcite.sql.SqlNode
EMPTY_ARRAY, pos -
Constructor Summary
ConstructorsConstructorDescriptionSqlBasicCall(SqlOperator operator, List<? extends @Nullable SqlNode> operandList, SqlParserPos pos) Creates a SqlBasicCall.SqlBasicCall(SqlOperator operator, List<? extends @Nullable SqlNode> operandList, SqlParserPos pos, @Nullable SqlLiteral functionQualifier) Creates a SqlBasicCall with an optional function qualifier.SqlBasicCall(SqlOperator operator, @Nullable SqlNode[] operands, SqlParserPos pos) Deprecated.SqlBasicCall(SqlOperator operator, @Nullable SqlNode[] operands, SqlParserPos pos, @Nullable SqlLiteral functionQualifier) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionclone(SqlParserPos pos) Clones a SqlNode with a different position.@Nullable SqlLiteralgetKind()Returns the type of node this is, orSqlKind.OTHERif it's nothing special.Returns the list of operands.<S extends SqlNode>
Soperand(int i) Returns i-th operand (0-based).intvoidsetOperand(int i, @Nullable SqlNode operand) Changes the value of an operand.voidsetOperator(SqlOperator operator) Sets the operator (or function) that is being called.withExpanded(boolean expanded) Sets whether this call is expanded.Methods inherited from class org.apache.calcite.sql.SqlCall
accept, equalsDeep, findValidOptions, getCallSignature, getMonotonicity, isCountStar, isExpanded, unparse, validateMethods inherited from class org.apache.calcite.sql.SqlNode
clone, clone, cloneArray, equalDeep, equalDeep, equalsDeep, getParserPosition, isA, toList, toList, toSqlString, toSqlString, toSqlString, toString, unparseWithParentheses, validateExpr
-
Constructor Details
-
SqlBasicCall
@Deprecated public SqlBasicCall(SqlOperator operator, @Nullable SqlNode[] operands, SqlParserPos pos) Deprecated. -
SqlBasicCall
public SqlBasicCall(SqlOperator operator, List<? extends @Nullable SqlNode> operandList, SqlParserPos pos) Creates a SqlBasicCall.It is not expanded; call
withExpanded(true)to expand. -
SqlBasicCall
@Deprecated public SqlBasicCall(SqlOperator operator, @Nullable SqlNode[] operands, SqlParserPos pos, @Nullable SqlLiteral functionQualifier) Deprecated. -
SqlBasicCall
public SqlBasicCall(SqlOperator operator, List<? extends @Nullable SqlNode> operandList, SqlParserPos pos, @Nullable SqlLiteral functionQualifier) Creates a SqlBasicCall with an optional function qualifier.It is not expanded; call
withExpanded(true)to expand.
-
-
Method Details
-
getKind
Description copied from class:SqlNodeReturns the type of node this is, orSqlKind.OTHERif it's nothing special. -
withExpanded
Sets whether this call is expanded.- See Also:
-
setOperand
Description copied from class:SqlCallChanges the value of an operand. Allows some rewrite bySqlValidator; use sparingly.- Overrides:
setOperandin classSqlCall- Parameters:
i- Operand indexoperand- Operand value
-
setOperator
Sets the operator (or function) that is being called.This method is used by the validator to set a more refined version of the same operator (for instance, a version where overloading has been resolved); use with care.
-
getOperator
- Specified by:
getOperatorin classSqlCall
-
getOperandList
Description copied from class:SqlCallReturns 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:
getOperandListin classSqlCall- Returns:
- the list of call operands, never null, the operands can be null
-
operand
Description copied from class:SqlCallReturns i-th operand (0-based).Note: the result might be null, so the proper signature would be
<S extends @Nullable SqlNode>, however, it would trigger to many changes to the current codebase. -
operandCount
public int operandCount()- Overrides:
operandCountin classSqlCall
-
getFunctionQuantifier
- Overrides:
getFunctionQuantifierin classSqlCall
-
clone
Description copied from class:SqlNodeClones a SqlNode with a different position.
-