Package org.apache.calcite.sql
Class SqlWithItem
- java.lang.Object
-
- org.apache.calcite.sql.SqlNode
-
- org.apache.calcite.sql.SqlCall
-
- org.apache.calcite.sql.SqlWithItem
-
- All Implemented Interfaces:
java.lang.Cloneable
public class SqlWithItem extends SqlCall
An item in a WITH clause of a query. It has a name, an optional column list, and a query.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SqlWithItem.SqlWithItemOperator
SqlWithItemOperator is used to represent an item in a WITH clause of a query.
-
Field Summary
Fields Modifier and Type Field Description SqlNodeList
columnList
SqlIdentifier
name
SqlNode
query
-
Fields inherited from class org.apache.calcite.sql.SqlNode
EMPTY_ARRAY, pos
-
-
Constructor Summary
Constructors Constructor Description SqlWithItem(SqlParserPos pos, SqlIdentifier name, SqlNodeList columnList, SqlNode query)
-
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.-
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
-
name
public SqlIdentifier name
-
columnList
public SqlNodeList columnList
-
query
public SqlNode query
-
-
Constructor Detail
-
SqlWithItem
public SqlWithItem(SqlParserPos pos, SqlIdentifier name, SqlNodeList columnList, SqlNode query)
-
-
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>)
-
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
-
getOperator
public SqlOperator getOperator()
- Specified by:
getOperator
in classSqlCall
-
-