Package org.apache.calcite.sql
Class SqlWith
- java.lang.Object
-
- org.apache.calcite.sql.SqlNode
-
- org.apache.calcite.sql.SqlCall
-
- org.apache.calcite.sql.SqlWith
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SqlWith extends SqlCall
The WITH clause of a query. It wraps a SELECT, UNION, or INTERSECT.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SqlWith.SqlWithOperator
SqlWithOperator is used to represent a WITH clause of a query.
-
Field Summary
Fields Modifier and Type Field Description SqlNode
body
SqlNodeList
withList
-
Fields inherited from class org.apache.calcite.sql.SqlNode
EMPTY_ARRAY, pos
-
-
Constructor Summary
Constructors Constructor Description SqlWith(SqlParserPos pos, SqlNodeList withList, SqlNode body)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlKind
getKind()
Returns the type of node this is, orSqlKind.OTHER
if it's nothing special.java.util.List<SqlNode>
getOperandList()
SqlOperator
getOperator()
void
setOperand(int i, SqlNode operand)
Changes the value of an operand.void
validate(SqlValidator validator, SqlValidatorScope scope)
Validates this call.-
Methods inherited from class org.apache.calcite.sql.SqlCall
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getMonotonicity, isCountStar, isExpanded, operand, operandCount, unparse
-
Methods inherited from class org.apache.calcite.sql.SqlNode
clone, clone, cloneArray, equalDeep, equalDeep, equalsDeep, getParserPosition, isA, toSqlString, toSqlString, toString, validateExpr
-
-
-
-
Field Detail
-
withList
public SqlNodeList withList
-
body
public SqlNode body
-
-
Constructor Detail
-
SqlWith
public SqlWith(SqlParserPos pos, SqlNodeList withList, SqlNode body)
-
-
Method Detail
-
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>)
-
getOperator
public SqlOperator getOperator()
- Specified by:
getOperator
in classSqlCall
-
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
-
validate
public void validate(SqlValidator validator, SqlValidatorScope scope)
Description copied from class:SqlCall
Validates this call.The default implementation delegates the validation to the operator's
SqlOperator.validateCall(org.apache.calcite.sql.SqlCall, org.apache.calcite.sql.validate.SqlValidator, org.apache.calcite.sql.validate.SqlValidatorScope, org.apache.calcite.sql.validate.SqlValidatorScope)
. Derived classes may override (as do, for exampleSqlSelect
andSqlUpdate
).
-
-