| Modifier and Type | Field and Description |
|---|---|
(package private) SqlNode |
fetch |
(package private) SqlNode |
from |
static int |
FROM_OPERAND |
(package private) SqlNodeList |
groupBy |
(package private) SqlNode |
having |
static int |
HAVING_OPERAND |
(package private) SqlNodeList |
keywordList |
(package private) SqlMatchRecognize |
matchRecognize |
(package private) SqlNode |
offset |
(package private) SqlNodeList |
orderBy |
(package private) SqlNodeList |
selectList |
(package private) SqlNode |
where |
static int |
WHERE_OPERAND |
(package private) SqlNodeList |
windowDecls |
EMPTY_ARRAY, pos| Constructor and Description |
|---|
SqlSelect(SqlParserPos pos,
SqlNodeList keywordList,
SqlNodeList selectList,
SqlNode from,
SqlNode where,
SqlNodeList groupBy,
SqlNode having,
SqlNodeList windowDecls,
SqlNodeList orderBy,
SqlNode offset,
SqlNode fetch) |
accept, clone, equalsDeep, findValidOptions, getCallSignature, getFunctionQuantifier, getMonotonicity, isCountStar, isExpanded, operand, operandCountclone, clone, cloneArray, equalDeep, equalDeep, equalsDeep, getParserPosition, isA, toSqlString, toSqlString, toString, validateExprpublic static final int FROM_OPERAND
public static final int WHERE_OPERAND
public static final int HAVING_OPERAND
SqlNodeList keywordList
SqlNodeList selectList
SqlNode from
SqlNode where
SqlNodeList groupBy
SqlNode having
SqlNodeList windowDecls
SqlNodeList orderBy
SqlNode offset
SqlNode fetch
SqlMatchRecognize matchRecognize
public SqlSelect(SqlParserPos pos, SqlNodeList keywordList, SqlNodeList selectList, SqlNode from, SqlNode where, SqlNodeList groupBy, SqlNode having, SqlNodeList windowDecls, SqlNodeList orderBy, SqlNode offset, SqlNode fetch)
public SqlOperator getOperator()
getOperator in class SqlCallpublic 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 List<SqlNode> getOperandList()
getOperandList in class SqlCallpublic void setOperand(int i,
SqlNode operand)
SqlCallSqlValidator; use sparingly.setOperand in class SqlCalli - Operand indexoperand - Operand valuepublic final boolean isDistinct()
public final SqlNode getModifierNode(SqlSelectKeyword modifier)
public final SqlNode getFrom()
public void setFrom(SqlNode from)
public final SqlNodeList getGroup()
public void setGroupBy(SqlNodeList groupBy)
public final SqlNode getHaving()
public void setHaving(SqlNode having)
public final SqlNodeList getSelectList()
public void setSelectList(SqlNodeList selectList)
public final SqlNode getWhere()
public void setWhere(SqlNode whereClause)
@Nonnull public final SqlNodeList getWindowList()
public final SqlNodeList getOrderList()
public void setOrderBy(SqlNodeList orderBy)
public final SqlNode getOffset()
public void setOffset(SqlNode offset)
public final SqlNode getFetch()
public void setFetch(SqlNode fetch)
public SqlMatchRecognize getMatchRecognize()
public void setMatchRecognize(SqlMatchRecognize matchRecognize)
public void validate(SqlValidator validator, SqlValidatorScope scope)
SqlCallThe 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 example SqlSelect and SqlUpdate).
public void unparse(SqlWriter writer, int leftPrec, int rightPrec)
SqlNodeThe leftPrec and rightPrec parameters give
us enough context to decide whether we need to enclose the expression in
parentheses. For example, we need parentheses around "2 + 3" if preceded
by "5 *". This is because the precedence of the "*" operator is greater
than the precedence of the "+" operator.
The algorithm handles left- and right-associative operators by giving them slightly different left- and right-precedence.
If SqlWriter.isAlwaysUseParentheses() is true, we use
parentheses even when they are not required by the precedence rules.
For the details of this algorithm, see SqlCall.unparse(org.apache.calcite.sql.SqlWriter, int, int).
public boolean hasOrderBy()
public boolean hasWhere()
public boolean isKeywordPresent(SqlSelectKeyword targetKeyWord)
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.