| Package | Description |
|---|---|
| org.apache.calcite.adapter.jdbc |
Query provider based on a JDBC data source.
|
| org.apache.calcite.jdbc |
JDBC driver for Calcite.
|
| org.apache.calcite.prepare |
Preparation of queries (parsing, planning and implementation).
|
| org.apache.calcite.rex |
Provides a language for representing row-expressions.
|
| org.apache.calcite.sql |
Provides a SQL parser and object model.
|
| org.apache.calcite.sql.advise |
Provides hints and corrections for editing SQL statements.
|
| org.apache.calcite.sql.fun |
Defines the set of standard SQL row-level functions and
operators.
|
| org.apache.calcite.sql.parser |
Provides a SQL parser.
|
| org.apache.calcite.sql.parser.impl |
Contains generated code for the
Calcite SQL parser. |
| org.apache.calcite.sql.pretty |
Provides a pretty-printer for SQL statements.
|
| org.apache.calcite.sql.type |
SQL type system.
|
| org.apache.calcite.sql.util |
Utility classes for the SQL object model, parsing, and validation.
|
| org.apache.calcite.sql.validate |
SQL validation.
|
| org.apache.calcite.sql2rel |
Translates a SQL parse tree to relational expression.
|
| org.apache.calcite.tools |
Provides utility classes.
|
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
JdbcImplementor.Result.asFrom()
Returns a node that can be included in the FROM clause or a JOIN.
|
SqlNode |
JdbcImplementor.Result.asQuery()
Converts a non-query node into a SELECT node.
|
abstract SqlNode |
JdbcImplementor.Context.field(int ordinal) |
SqlNode |
JdbcImplementor.AliasContext.field(int ordinal) |
SqlNode |
JdbcImplementor.Context.toSql(AggregateCall aggCall)
Converts a call to an aggregate function to an expression.
|
SqlNode |
JdbcImplementor.Context.toSql(RelFieldCollation collation)
Converts a collation to an ORDER BY item.
|
| Modifier and Type | Method and Description |
|---|---|
List<SqlNode> |
JdbcImplementor.Context.fieldList() |
| Modifier and Type | Method and Description |
|---|---|
JdbcImplementor.Result |
JdbcImplementor.result(SqlNode node,
Collection<org.apache.calcite.adapter.jdbc.JdbcImplementor.Clause> clauses,
RelNode rel)
Creates a result based on a single relational expression.
|
JdbcImplementor.Result |
JdbcImplementor.result(SqlNode join,
JdbcImplementor.Result leftResult,
JdbcImplementor.Result rightResult)
Creates a result based on a join.
|
void |
JdbcImplementor.Builder.setWhere(SqlNode node) |
| Modifier and Type | Field and Description |
|---|---|
SqlNode |
CalcitePrepare.ParseResult.sqlNode |
| Constructor and Description |
|---|
CalcitePrepare.ConvertResult(CalcitePrepareImpl prepare,
SqlValidator validator,
String sql,
SqlNode sqlNode,
RelDataType rowType,
RelNode relNode) |
CalcitePrepare.ParseResult(CalcitePrepareImpl prepare,
SqlValidator validator,
String sql,
SqlNode sqlNode,
RelDataType rowType) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
PlannerImpl.parse(String sql) |
SqlNode |
PlannerImpl.validate(SqlNode sqlNode) |
| Modifier and Type | Method and Description |
|---|---|
RelNode |
PlannerImpl.convert(SqlNode sql) |
protected abstract RelNode |
Prepare.decorrelate(SqlToRelConverter sqlToRelConverter,
SqlNode query,
RelNode rootRel) |
Prepare.PreparedResult |
Prepare.prepareSql(SqlNode sqlQuery,
Class runtimeContextClass,
SqlValidator validator,
boolean needsValidation,
List<Prepare.Materialization> materializations,
List<CalciteSchema.LatticeEntry> lattices) |
Prepare.PreparedResult |
Prepare.prepareSql(SqlNode sqlQuery,
SqlNode sqlNodeOriginal,
Class runtimeContextClass,
SqlValidator validator,
boolean needsValidation,
List<Prepare.Materialization> materializations,
List<CalciteSchema.LatticeEntry> lattices) |
SqlNode |
PlannerImpl.validate(SqlNode sqlNode) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
RexToSqlNodeConverterImpl.convertCall(RexCall call) |
SqlNode |
RexToSqlNodeConverter.convertCall(RexCall call)
|
SqlNode |
RexSqlStandardConvertletTable.convertCall(RexToSqlNodeConverter converter,
RexCall call)
Converts a call to an operator into a
SqlCall to the same
operator. |
SqlNode |
RexSqlConvertlet.convertCall(RexToSqlNodeConverter converter,
RexCall call)
|
SqlNode |
RexToSqlNodeConverterImpl.convertInputRef(RexInputRef ref) |
SqlNode |
RexToSqlNodeConverter.convertInputRef(RexInputRef ref)
Converts a
RexInputRef to a SqlIdentifier. |
SqlNode |
RexToSqlNodeConverterImpl.convertLiteral(RexLiteral literal) |
SqlNode |
RexToSqlNodeConverter.convertLiteral(RexLiteral literal)
Converts a
RexLiteral to a SqlLiteral. |
SqlNode |
RexToSqlNodeConverterImpl.convertNode(RexNode node) |
SqlNode |
RexToSqlNodeConverter.convertNode(RexNode node)
|
| Modifier and Type | Method and Description |
|---|---|
static RexWindowBound |
RexWindowBound.create(SqlNode node,
RexNode rexNode)
Creates window bound.
|
| Modifier and Type | Class and Description |
|---|---|
class |
SqlBasicCall
Implementation of
SqlCall that keeps its operands in an array. |
class |
SqlBinaryStringLiteral
A binary (or hexadecimal) string literal.
|
class |
SqlCall
A
SqlCall is a call to an operator. |
class |
SqlCharStringLiteral
A character string literal.
|
class |
SqlDataTypeSpec
Represents a SQL data type specification in a parse tree.
|
class |
SqlDateLiteral
A SQL literal representing a DATE value, such as
DATE
'2004-10-22'. |
class |
SqlDelete
A
SqlDelete is a node of a parse tree which represents a DELETE
statement. |
class |
SqlDynamicParam
A
SqlDynamicParam represents a dynamic parameter marker in an
SQL statement. |
class |
SqlExplain
A
SqlExplain is a node of a parse tree which represents an
EXPLAIN PLAN statement. |
class |
SqlIdentifier
A
SqlIdentifier is an identifier, possibly compound. |
class |
SqlInsert
A
SqlInsert is a node of a parse tree which represents an INSERT
statement. |
class |
SqlIntervalLiteral
A SQL literal representing a time interval.
|
class |
SqlIntervalQualifier
Represents an INTERVAL qualifier.
|
class |
SqlJoin
Parse tree node representing a
JOIN clause. |
class |
SqlLiteral
A
SqlLiteral is a constant. |
class |
SqlMerge
A
SqlMerge is a node of a parse tree which represents a MERGE
statement. |
class |
SqlNodeList
A
SqlNodeList is a list of SqlNodes. |
class |
SqlNumericLiteral
A numeric SQL literal.
|
class |
SqlOrderBy
Parse tree node that represents an
ORDER BY on a query other than a
SELECT (e.g. |
class |
SqlSelect
A
SqlSelect is a node of a parse tree which represents a select
statement. |
class |
SqlSetOption
SQL parse tree node to represent
ALTER scope SET option = value
statement. |
class |
SqlTimeLiteral
A SQL literal representing a TIME value, for example
TIME
'14:33:44.567'. |
class |
SqlTimestampLiteral
A SQL literal representing a TIMESTAMP value, for example
TIMESTAMP
'1969-07-21 03:15 GMT'. |
class |
SqlUpdate
A
SqlUpdate is a node of a parse tree which represents an UPDATE
statement. |
class |
SqlWindow
SQL window specification.
|
class |
SqlWith
The WITH clause of a query.
|
class |
SqlWithItem
An item in a WITH clause of a query.
|
| Modifier and Type | Field and Description |
|---|---|
SqlNode |
SqlWith.body |
static SqlNode[] |
SqlNode.EMPTY_ARRAY |
SqlNode |
SqlOrderBy.fetch |
SqlNode |
SqlOrderBy.offset |
SqlNode[] |
SqlBasicCall.operands |
SqlNode |
SqlWithItem.query |
SqlNode |
SqlOrderBy.query |
| Modifier and Type | Method and Description |
|---|---|
<S extends SqlNode> |
SqlCall.operand(int i) |
<S extends SqlNode> |
SqlBasicCall.operand(int i) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlDataTypeSpec.clone(SqlParserPos pos) |
SqlNode |
SqlDynamicParam.clone(SqlParserPos pos) |
SqlNode |
SqlCharStringLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlNumericLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlCall.clone(SqlParserPos pos) |
SqlNode |
SqlIdentifier.clone(SqlParserPos pos) |
SqlNode |
SqlIntervalQualifier.clone(SqlParserPos pos) |
SqlNode |
SqlTimeLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlDateLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlIntervalLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlTimestampLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlNode.clone(SqlParserPos pos)
Clones a SqlNode with a different position.
|
SqlNode |
SqlLiteral.clone(SqlParserPos pos) |
SqlNode |
SqlBinaryStringLiteral.clone(SqlParserPos pos) |
static SqlNode[] |
SqlNode.cloneArray(SqlNode[] nodes) |
static SqlNode |
SqlWindow.createBound(SqlLiteral range) |
static SqlNode |
SqlWindow.createCurrentRow(SqlParserPos pos) |
static SqlNode |
SqlWindow.createFollowing(SqlNode e,
SqlParserPos pos) |
static SqlNode |
SqlWindow.createPreceding(SqlNode e,
SqlParserPos pos) |
static SqlNode |
SqlWindow.createUnboundedFollowing(SqlParserPos pos) |
static SqlNode |
SqlWindow.createUnboundedPreceding(SqlParserPos pos) |
SqlNode |
SqlNodeList.get(int n) |
SqlNode |
SqlMerge.getCondition() |
SqlNode |
SqlDelete.getCondition()
Gets the filter condition for rows to be deleted.
|
SqlNode |
SqlUpdate.getCondition()
Gets the filter condition for rows to be updated.
|
SqlNode |
SqlJoin.getCondition() |
SqlNode |
SqlExplain.getExplicandum() |
SqlNode |
SqlSelect.getFetch() |
SqlNode |
SqlSelect.getFrom() |
static SqlNode |
SqlUtil.getFromNode(SqlSelect query,
int ordinal)
Returns the
nth (0-based) input to a join expression. |
SqlNode |
SqlSelect.getHaving() |
SqlNode |
SqlJoin.getLeft() |
SqlNode |
SqlWindow.getLowerBound() |
SqlNode |
SqlInsert.getModifierNode(SqlInsertKeyword modifier) |
SqlNode |
SqlSelect.getModifierNode(SqlSelectKeyword modifier) |
SqlNode |
SqlSelect.getOffset() |
SqlNode[] |
SqlBasicCall.getOperands() |
SqlNode |
SqlJoin.getRight() |
static SqlNode |
SqlUtil.getSelectListItem(SqlNode query,
int i)
Returns the
ith select-list item of a query. |
SqlNode |
SqlInsert.getSource() |
SqlNode |
SqlMerge.getSourceTableRef() |
SqlNode |
SqlMerge.getTargetTable() |
SqlNode |
SqlInsert.getTargetTable() |
SqlNode |
SqlDelete.getTargetTable() |
SqlNode |
SqlUpdate.getTargetTable() |
SqlNode |
SqlWindow.getUpperBound() |
SqlNode |
SqlSetOption.getValue() |
SqlNode |
SqlSelect.getWhere() |
SqlNode |
SqlOperator.rewriteCall(SqlValidator validator,
SqlCall call)
Rewrites a call to this operator.
|
SqlNode |
SqlProcedureCallOperator.rewriteCall(SqlValidator validator,
SqlCall call) |
SqlNode |
SqlNodeList.set(int n,
SqlNode node) |
static SqlNode |
SqlUtil.stripAs(SqlNode node)
If a node is "AS", returns the underlying expression; otherwise returns
the node.
|
SqlNode[] |
SqlNodeList.toArray() |
| Modifier and Type | Method and Description |
|---|---|
static com.google.common.collect.ImmutableList<SqlNode> |
SqlUtil.getAncestry(SqlNode root,
com.google.common.base.Predicate<SqlNode> predicate,
com.google.common.base.Predicate<SqlNode> postPredicate)
Returns a list of ancestors of
predicate within a given
SqlNode tree. |
List<SqlNode> |
SqlNodeList.getList() |
List<SqlNode> |
SqlMerge.getOperandList() |
List<SqlNode> |
SqlWith.getOperandList() |
List<SqlNode> |
SqlInsert.getOperandList() |
List<SqlNode> |
SqlWithItem.getOperandList() |
List<SqlNode> |
SqlDelete.getOperandList() |
abstract List<SqlNode> |
SqlCall.getOperandList() |
List<SqlNode> |
SqlUpdate.getOperandList() |
List<SqlNode> |
SqlBasicCall.getOperandList() |
List<SqlNode> |
SqlOrderBy.getOperandList() |
List<SqlNode> |
SqlSelect.getOperandList() |
List<SqlNode> |
SqlSetOption.getOperandList() |
List<SqlNode> |
SqlExplain.getOperandList() |
List<SqlNode> |
SqlWindow.getOperandList() |
List<SqlNode> |
SqlJoin.getOperandList() |
Iterator<SqlNode> |
SqlNodeList.iterator() |
| Modifier and Type | Method and Description |
|---|---|
void |
SqlNodeList.add(SqlNode node) |
static SqlNode[] |
SqlNode.cloneArray(SqlNode[] nodes) |
static SqlWindow |
SqlWindow.create(SqlIdentifier declName,
SqlIdentifier refName,
SqlNodeList partitionList,
SqlNodeList orderList,
SqlLiteral isRows,
SqlNode lowerBound,
SqlNode upperBound,
SqlLiteral allowPartial,
SqlParserPos pos) |
SqlCall |
SqlOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands)
Creates a call to this operand with an array of operands.
|
SqlCall |
SqlJdbcFunctionCall.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlJoin.SqlJoinOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlSelectOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlSelect |
SqlSelectOperator.createCall(SqlNodeList keywordList,
SqlNodeList selectList,
SqlNode fromClause,
SqlNode whereClause,
SqlNodeList groupBy,
SqlNode having,
SqlNodeList windowDecls,
SqlNodeList orderBy,
SqlNode offset,
SqlNode fetch,
SqlParserPos pos)
Creates a call to the
SELECT operator. |
SqlCall |
SqlOperator.createCall(SqlParserPos pos,
SqlNode... operands)
Creates a call to this operand with an array of operands.
|
static SqlNode |
SqlWindow.createFollowing(SqlNode e,
SqlParserPos pos) |
static SqlNode |
SqlWindow.createPreceding(SqlNode e,
SqlParserPos pos) |
static boolean |
SqlNode.equalDeep(SqlNode node1,
SqlNode node2,
boolean fail)
Returns whether two nodes are equal (using
equalsDeep(SqlNode, boolean)) or are both null. |
boolean |
SqlDataTypeSpec.equalsDeep(SqlNode node,
boolean fail) |
boolean |
SqlDynamicParam.equalsDeep(SqlNode node,
boolean fail) |
boolean |
SqlCall.equalsDeep(SqlNode node,
boolean fail) |
boolean |
SqlIdentifier.equalsDeep(SqlNode node,
boolean fail) |
boolean |
SqlIntervalQualifier.equalsDeep(SqlNode node,
boolean fail) |
boolean |
SqlNodeList.equalsDeep(SqlNode node,
boolean fail) |
abstract boolean |
SqlNode.equalsDeep(SqlNode node,
boolean fail)
Returns whether this node is structurally equivalent to another node.
|
boolean |
SqlWindow.equalsDeep(SqlNode node,
boolean fail)
Overridden method to specifically check only the right subtree of a window
definition.
|
boolean |
SqlLiteral.equalsDeep(SqlNode node,
boolean fail) |
static com.google.common.collect.ImmutableList<SqlNode> |
SqlUtil.getAncestry(SqlNode root,
com.google.common.base.Predicate<SqlNode> predicate,
com.google.common.base.Predicate<SqlNode> postPredicate)
Returns a list of ancestors of
predicate within a given
SqlNode tree. |
static SqlNode |
SqlUtil.getSelectListItem(SqlNode query,
int i)
Returns the
ith select-list item of a query. |
static boolean |
SqlUtil.isCallTo(SqlNode node,
SqlOperator operator)
|
static boolean |
SqlWindow.isCurrentRow(SqlNode node)
Returns whether an expression represents the "CURRENT ROW" bound.
|
static boolean |
SqlNodeList.isEmptyList(SqlNode node) |
static boolean |
SqlUtil.isLiteral(SqlNode node)
Returns whether a node is a literal.
|
static boolean |
SqlUtil.isLiteralChain(SqlNode node)
Returns whether a node is a literal chain which is used to represent a
continued string literal.
|
static boolean |
SqlUtil.isNull(SqlNode node)
Returns whether a node represents the NULL value or a series of nested
CAST(NULL AS type) calls. |
static boolean |
SqlUtil.isNullLiteral(SqlNode node,
boolean allowCast)
Returns whether a node represents the NULL value.
|
static boolean |
SqlWindow.isUnboundedFollowing(SqlNode node)
Returns whether an expression represents the "UNBOUNDED FOLLOWING" bound.
|
static boolean |
SqlWindow.isUnboundedPreceding(SqlNode node)
Returns whether an expression represents the "UNBOUNDED PRECEDING" bound.
|
static SqlSampleSpec |
SqlLiteral.sampleValue(SqlNode node)
Extracts the
SqlSampleSpec value from a symbol literal. |
SqlNode |
SqlNodeList.set(int n,
SqlNode node) |
void |
SqlSelect.setFetch(SqlNode fetch) |
void |
SqlSelect.setFrom(SqlNode from) |
void |
SqlJoin.setLeft(SqlNode left) |
void |
SqlWindow.setLowerBound(SqlNode lowerBound) |
void |
SqlSelect.setOffset(SqlNode offset) |
void |
SqlMerge.setOperand(int i,
SqlNode operand) |
void |
SqlWith.setOperand(int i,
SqlNode operand) |
void |
SqlInsert.setOperand(int i,
SqlNode operand) |
void |
SqlWithItem.setOperand(int i,
SqlNode operand) |
void |
SqlDelete.setOperand(int i,
SqlNode operand) |
void |
SqlCall.setOperand(int i,
SqlNode operand)
Changes the value of an operand.
|
void |
SqlUpdate.setOperand(int i,
SqlNode operand) |
void |
SqlBasicCall.setOperand(int i,
SqlNode operand) |
void |
SqlSelect.setOperand(int i,
SqlNode operand) |
void |
SqlSetOption.setOperand(int i,
SqlNode operand) |
void |
SqlExplain.setOperand(int i,
SqlNode operand) |
void |
SqlWindow.setOperand(int i,
SqlNode operand) |
void |
SqlJoin.setOperand(int i,
SqlNode operand) |
void |
SqlJoin.setRight(SqlNode right) |
void |
SqlMerge.setSourceTableRef(SqlNode tableRef) |
void |
SqlWindow.setUpperBound(SqlNode upperBound) |
void |
SqlSetOption.setValue(SqlNode value) |
void |
SqlSelect.setWhere(SqlNode whereClause) |
static String |
SqlLiteral.stringValue(SqlNode node)
Extracts the string value from a string literal, a chain of string
literals, or a CAST of a string literal.
|
static SqlNode |
SqlUtil.stripAs(SqlNode node)
If a node is "AS", returns the underlying expression; otherwise returns
the node.
|
static SqlNodeList |
SqlUtil.toNodeList(SqlNode[] operands)
Converts an SqlNode array to a SqlNodeList
|
static SqlLiteral |
SqlLiteral.unchain(SqlNode node)
Converts a chained string literals into regular literals; returns regular
literals unchanged.
|
protected void |
SqlOperator.unparseListClause(SqlWriter writer,
SqlNode clause) |
protected void |
SqlOperator.unparseListClause(SqlWriter writer,
SqlNode clause,
SqlKind sepKind) |
| Modifier and Type | Method and Description |
|---|---|
SqlCall |
SqlOperator.createCall(SqlParserPos pos,
List<? extends SqlNode> operandList)
Creates a call to this operand with a list of operands.
|
static boolean |
SqlNode.equalDeep(List<SqlNode> operands0,
List<SqlNode> operands1,
boolean fail)
Returns whether two lists of operands are equal.
|
static boolean |
SqlNode.equalDeep(List<SqlNode> operands0,
List<SqlNode> operands1,
boolean fail)
Returns whether two lists of operands are equal.
|
static com.google.common.collect.ImmutableList<SqlNode> |
SqlUtil.getAncestry(SqlNode root,
com.google.common.base.Predicate<SqlNode> predicate,
com.google.common.base.Predicate<SqlNode> postPredicate)
Returns a list of ancestors of
predicate within a given
SqlNode tree. |
static com.google.common.collect.ImmutableList<SqlNode> |
SqlUtil.getAncestry(SqlNode root,
com.google.common.base.Predicate<SqlNode> predicate,
com.google.common.base.Predicate<SqlNode> postPredicate)
Returns a list of ancestors of
predicate within a given
SqlNode tree. |
| Constructor and Description |
|---|
SqlBasicCall(SqlOperator operator,
SqlNode[] operands,
SqlParserPos pos) |
SqlBasicCall(SqlOperator operator,
SqlNode[] operands,
SqlParserPos pos,
boolean expanded,
SqlLiteral functionQualifier) |
SqlDelete(SqlParserPos pos,
SqlNode targetTable,
SqlNode condition,
SqlSelect sourceSelect,
SqlIdentifier alias) |
SqlExplain(SqlParserPos pos,
SqlNode explicandum,
SqlLiteral detailLevel,
SqlLiteral depth,
SqlLiteral asXml,
int dynamicParameterCount) |
SqlInsert(SqlParserPos pos,
SqlNodeList keywords,
SqlNode targetTable,
SqlNode source,
SqlNodeList columnList) |
SqlJoin(SqlParserPos pos,
SqlNode left,
SqlLiteral natural,
SqlLiteral joinType,
SqlNode right,
SqlLiteral conditionType,
SqlNode condition) |
SqlMerge(SqlParserPos pos,
SqlNode targetTable,
SqlNode condition,
SqlNode source,
SqlUpdate updateCall,
SqlInsert insertCall,
SqlSelect sourceSelect,
SqlIdentifier alias) |
SqlOrderBy(SqlParserPos pos,
SqlNode query,
SqlNodeList orderList,
SqlNode offset,
SqlNode fetch) |
SqlSelect(SqlParserPos pos,
SqlNodeList keywordList,
SqlNodeList selectList,
SqlNode from,
SqlNode where,
SqlNodeList groupBy,
SqlNode having,
SqlNodeList windowDecls,
SqlNodeList orderBy,
SqlNode offset,
SqlNode fetch) |
SqlSetOption(SqlParserPos pos,
String scope,
String name,
SqlNode value)
Creates a node.
|
SqlUpdate(SqlParserPos pos,
SqlNode targetTable,
SqlNodeList targetColumnList,
SqlNodeList sourceExpressionList,
SqlNode condition,
SqlSelect sourceSelect,
SqlIdentifier alias) |
SqlWindow(SqlParserPos pos,
SqlIdentifier declName,
SqlIdentifier refName,
SqlNodeList partitionList,
SqlNodeList orderList,
SqlLiteral isRows,
SqlNode lowerBound,
SqlNode upperBound,
SqlLiteral allowPartial)
Creates a window.
|
SqlWith(SqlParserPos pos,
SqlNodeList withList,
SqlNode body) |
SqlWithItem(SqlParserPos pos,
SqlIdentifier name,
SqlNodeList columnList,
SqlNode query) |
| Constructor and Description |
|---|
SqlNodeList(Collection<? extends SqlNode> collection,
SqlParserPos pos)
Creates a
SqlNodeList containing the nodes in
list. |
| Modifier and Type | Method and Description |
|---|---|
protected SqlNode |
SqlAdvisor.collectParserError(String sql,
List<SqlAdvisor.ValidateErrorInfo> errorList)
Attempts to parse a SQL statement and adds to the errorList if any syntax
error is found.
|
SqlNode |
SqlAdvisorValidator.expand(SqlNode expr,
SqlValidatorScope scope) |
SqlNode |
SqlAdvisorValidator.expandOrderExpr(SqlSelect select,
SqlNode orderExpr) |
protected SqlNode |
SqlAdvisor.parseQuery(String sql)
Wrapper function to parse a SQL query (SELECT or VALUES, but not INSERT,
UPDATE, DELETE, CREATE, DROP etc.), throwing a
SqlParseException
if the statement is not syntactically valid. |
| Modifier and Type | Method and Description |
|---|---|
RelDataType |
SqlAdvisorValidator.deriveType(SqlValidatorScope scope,
SqlNode operand)
Calls the parent class method and mask Farrago exception thrown.
|
SqlNode |
SqlAdvisorValidator.expand(SqlNode expr,
SqlValidatorScope scope) |
SqlNode |
SqlAdvisorValidator.expandOrderExpr(SqlSelect select,
SqlNode orderExpr) |
protected void |
SqlAdvisorValidator.validateFrom(SqlNode node,
RelDataType targetRowType,
SqlValidatorScope scope) |
| Modifier and Type | Class and Description |
|---|---|
class |
SqlCase
A
SqlCase is a node of a parse tree which represents a case
statement. |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlCase.getElseOperand() |
SqlNode |
SqlCase.getValueOperand() |
SqlNode |
SqlCoalesceFunction.rewriteCall(SqlValidator validator,
SqlCall call) |
SqlNode |
SqlNewOperator.rewriteCall(SqlValidator validator,
SqlCall call) |
SqlNode |
SqlNullifFunction.rewriteCall(SqlValidator validator,
SqlCall call) |
| Modifier and Type | Method and Description |
|---|---|
List<SqlNode> |
SqlCase.getOperandList() |
| Modifier and Type | Method and Description |
|---|---|
SqlCall |
SqlCaseOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlTrimFunction.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
static SqlCase |
SqlCase.createSwitched(SqlParserPos pos,
SqlNode value,
SqlNodeList whenList,
SqlNodeList thenList,
SqlNode elseClause)
Creates a call to the switched form of the case operator, viz:
CASE value |
void |
SqlCase.setOperand(int i,
SqlNode operand) |
| Constructor and Description |
|---|
SqlCase(SqlParserPos pos,
SqlNode value,
SqlNodeList whenList,
SqlNodeList thenList,
SqlNode elseExpr)
Creates a SqlCase expression.
|
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlParser.parseExpression()
Parses a SQL expression.
|
SqlNode |
SqlParser.parseQuery()
Parses a
SELECT statement. |
abstract SqlNode |
SqlAbstractParserImpl.parseSqlExpressionEof()
Parses a SQL expression ending with EOF and constructs a
parse tree.
|
abstract SqlNode |
SqlAbstractParserImpl.parseSqlStmtEof()
Parses a SQL statement ending with EOF and constructs a
parse tree.
|
SqlNode |
SqlParser.parseStmt()
Parses an SQL statement.
|
static SqlNode[] |
SqlParserUtil.toNodeArray(List<SqlNode> list) |
static SqlNode[] |
SqlParserUtil.toNodeArray(SqlNodeList list) |
static SqlNode |
SqlParserUtil.toTree(List<Object> list)
Converts a list of {expression, operator, expression, ...} into a tree,
taking operator precedence and associativity into account.
|
static SqlNode |
SqlParserUtil.toTreeEx(List<Object> list,
int start,
int minPrec,
SqlKind stopperKind)
Converts a list of {expression, operator, expression, ...} into a tree,
taking operator precedence and associativity into account.
|
| Modifier and Type | Method and Description |
|---|---|
protected SqlCall |
SqlAbstractParserImpl.createCall(SqlIdentifier funName,
SqlParserPos pos,
SqlFunctionCategory funcType,
SqlLiteral functionQualifier,
SqlNode[] operands)
Creates a call.
|
SqlParserPos |
SqlParserPos.plusAll(SqlNode[] nodes)
Combines this parser position with an array of positions to create a
position that spans from the first point in the first to the last point
in the other.
|
static SqlParserPos |
SqlParserPos.sum(SqlNode[] nodes)
Combines the parser positions of an array of nodes to create a position
which spans from the beginning of the first to the end of the last.
|
| Modifier and Type | Method and Description |
|---|---|
SqlParserPos |
SqlParserPos.plusAll(Collection<SqlNode> nodeList)
Combines this parser position with a list of positions.
|
static SqlParserPos |
SqlParserPos.sum(List<? extends SqlNode> nodes)
Combines the parser positions of a list of nodes to create a position
which spans from the beginning of the first to the end of the last.
|
static SqlNode[] |
SqlParserUtil.toNodeArray(List<SqlNode> list) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlParserImpl.ArrayConstructor()
Parses an ARRAY constructor
|
SqlNode |
SqlParserImpl.AtomicRowExpression()
Parses an atomic row expression.
|
SqlNode |
SqlParserImpl.BuiltinFunctionCall()
Parses a call to a builtin function with special syntax.
|
SqlNode |
SqlParserImpl.CaseExpression() |
SqlNode |
SqlParserImpl.CursorExpression(SqlAbstractParserImpl.ExprContext exprContext)
Parses a CURSOR(query) expression.
|
SqlNode |
SqlParserImpl.ExplicitTable(SqlParserPos pos)
Parses an explicit TABLE t reference.
|
SqlNode |
SqlParserImpl.Expression(SqlAbstractParserImpl.ExprContext exprContext)
Parses a row expression or a parenthesized expression of any kind.
|
SqlNode |
SqlParserImpl.Expression3(SqlAbstractParserImpl.ExprContext exprContext)
Parses a unary row expression, or a parenthesized expression of any
kind.
|
SqlNode |
SqlParserImpl.ExtendedBuiltinFunctionCall() |
SqlNode |
SqlParserImpl.ExtendedTableRef()
Allows parser to be extended with new types of table references.
|
SqlNode |
SqlParserImpl.FloorCeilOptions(SqlParserPos pos,
boolean floorFlag) |
SqlNode |
SqlParserImpl.FromClause()
Parses the FROM clause a SELECT.
|
SqlNode |
SqlParserImpl.GroupingElement() |
SqlNode |
SqlParserImpl.HavingOpt()
Parses the optional HAVING clause for SELECT.
|
SqlNode |
SqlParserImpl.JdbcFunctionCall()
Parses a function call expression with JDBC syntax.
|
SqlNode |
SqlParserImpl.JoinTable(SqlNode e)
Matches "LEFT JOIN t ON ...", "RIGHT JOIN t USING ...", "JOIN t".
|
SqlNode |
SqlParserImpl.LeafQuery(SqlAbstractParserImpl.ExprContext exprContext)
Parses a leaf in a query expression (SELECT, VALUES or TABLE).
|
SqlNode |
SqlParserImpl.LeafQueryOrExpr(SqlAbstractParserImpl.ExprContext exprContext)
Parses either a row expression, a leaf query expression, or
a parenthesized expression of any kind.
|
SqlNode |
SqlParserImpl.Literal()
Parses a literal expression, allowing continued string literals.
|
SqlNode |
SqlParserImpl.MapConstructor()
Parses an MAP constructor
|
SqlNode |
SqlParserImpl.MultisetConstructor()
Parses a MULTISET constructor
|
SqlNode |
SqlParserImpl.NamedFunctionCall()
Parses a call to a named function (could be a builtin with regular
syntax, or else a UDF).
|
SqlNode |
SqlParserImpl.NamedRoutineCall(SqlFunctionCategory routineType,
SqlAbstractParserImpl.ExprContext exprContext) |
SqlNode |
SqlParserImpl.NewSpecification()
Parses a NEW UDT(...) expression.
|
SqlNode |
SqlParserImpl.OrderedQueryOrExpr(SqlAbstractParserImpl.ExprContext exprContext)
Parses either a row expression or a query expression with an optional
ORDER BY.
|
SqlNode |
SqlParserImpl.OrderItem()
Parses one list item in an ORDER BY clause.
|
SqlNode |
SqlParserImpl.ParenthesizedExpression(SqlAbstractParserImpl.ExprContext exprContext)
Parses a parenthesized query or single row expression.
|
SqlNode |
SqlParserImpl.parseSqlExpressionEof() |
SqlNode |
SqlParserImpl.parseSqlStmtEof() |
SqlNode |
SqlParserImpl.QueryOrExpr(SqlAbstractParserImpl.ExprContext exprContext)
Parses either a row expression or a query expression without ORDER BY.
|
SqlNode |
SqlParserImpl.RowConstructor()
Parses a row constructor in the context of a VALUES expression.
|
SqlNode |
SqlParserImpl.SelectExpression()
Parses one unaliased expression in a select list.
|
SqlNode |
SqlParserImpl.SelectItem()
Parses one item in a select list.
|
SqlNode |
SqlParserImpl.SqlDelete()
Parses a DELETE statement.
|
SqlNode |
SqlParserImpl.SqlExplain()
Parses an EXPLAIN PLAN statement.
|
SqlNode |
SqlParserImpl.SqlExpressionEof()
Parses a SQL expression (such as might occur in a WHERE clause) followed by
the end-of-file symbol.
|
SqlNode |
SqlParserImpl.SqlInsert()
Parses an INSERT statement.
|
SqlNode |
SqlParserImpl.SqlMerge()
Parses a MERGE statement.
|
SqlNode |
SqlParserImpl.SqlProcedureCall()
Parses a CALL statement.
|
SqlNode |
SqlParserImpl.SqlQueryEof()
Parses a query (SELECT, UNION, INTERSECT, EXCEPT, VALUES, TABLE) followed by
the end-of-file symbol.
|
SqlNode |
SqlParserImpl.SqlStmt()
Parses an SQL statement.
|
SqlNode |
SqlParserImpl.SqlStmtEof()
Parses an SQL statement followed by the end-of-file symbol.
|
SqlNode |
SqlParserImpl.SqlUpdate()
Parses an UPDATE statement.
|
SqlNode |
SqlParserImpl.StandardFloorCeilOptions(SqlParserPos pos,
boolean floorFlag) |
SqlNode |
SqlParserImpl.StringLiteral()
Parses a string literal.
|
SqlNode |
SqlParserImpl.TableConstructor()
Parses a VALUES leaf query expression.
|
SqlNode |
SqlParserImpl.TableFunctionCall(SqlParserPos pos) |
SqlNode |
SqlParserImpl.TableOverOpt()
Allows an OVER clause following a table expression as an extension to
standard SQL syntax.
|
SqlNode |
SqlParserImpl.TableRef()
Parses a table reference in a FROM clause.
|
SqlNode |
SqlParserImpl.WhereOpt()
Parses the optional WHERE clause for SELECT, DELETE, and UPDATE.
|
SqlNode |
SqlParserImpl.WindowRange() |
| Modifier and Type | Method and Description |
|---|---|
List<SqlNode> |
SqlParserImpl.GroupingElementList() |
List<SqlNode> |
SqlParserImpl.SelectList()
Parses the select list of a SELECT statement.
|
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlParserImpl.JoinTable(SqlNode e)
Matches "LEFT JOIN t ON ...", "RIGHT JOIN t USING ...", "JOIN t".
|
SqlUpdate |
SqlParserImpl.WhenMatchedClause(SqlNode table,
SqlIdentifier alias) |
SqlInsert |
SqlParserImpl.WhenNotMatchedClause(SqlNode table) |
| Modifier and Type | Method and Description |
|---|---|
void |
SqlParserImpl.ColumnType(List<SqlNode> list) |
| Modifier and Type | Method and Description |
|---|---|
String |
SqlPrettyWriter.format(SqlNode node) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
FamilyOperandTypeChecker.checkSingleOperandType(SqlCallBinding callBinding,
SqlNode node,
int iFormalOperand,
boolean throwOnFailure) |
boolean |
CompositeSingleOperandTypeChecker.checkSingleOperandType(SqlCallBinding callBinding,
SqlNode node,
int iFormalOperand,
boolean throwOnFailure) |
boolean |
LiteralOperandTypeChecker.checkSingleOperandType(SqlCallBinding callBinding,
SqlNode node,
int iFormalOperand,
boolean throwOnFailure) |
boolean |
SameOperandTypeChecker.checkSingleOperandType(SqlCallBinding callBinding,
SqlNode operand,
int iFormalOperand,
boolean throwOnFailure) |
boolean |
SqlSingleOperandTypeChecker.checkSingleOperandType(SqlCallBinding callBinding,
SqlNode operand,
int iFormalOperand,
boolean throwOnFailure)
Checks the type of a single operand against a particular ordinal position
within a formal operator signature.
|
| Modifier and Type | Method and Description |
|---|---|
static List<RelDataType> |
SqlTypeUtil.deriveAndCollectTypes(SqlValidator validator,
SqlValidatorScope scope,
List<SqlNode> operands)
Iterates over all operands, derives their types, and collects them into
a list.
|
static boolean |
SqlTypeUtil.isCharTypeComparable(SqlCallBinding binding,
List<SqlNode> operands,
boolean throwOnFailure)
Returns whether the operands to a call are char type-comparable.
|
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlShuttle.CallCopyingArgHandler.result() |
SqlNode |
SqlShuttle.visit(SqlCall call) |
SqlNode |
SqlShuttle.visit(SqlDataTypeSpec type) |
SqlNode |
SqlShuttle.visit(SqlDynamicParam param) |
SqlNode |
SqlShuttle.visit(SqlIdentifier id) |
SqlNode |
SqlShuttle.visit(SqlIntervalQualifier intervalQualifier) |
SqlNode |
SqlShuttle.visit(SqlLiteral literal) |
SqlNode |
SqlShuttle.visit(SqlNodeList nodeList) |
SqlNode |
SqlShuttle.CallCopyingArgHandler.visitChild(SqlVisitor<SqlNode> visitor,
SqlNode expr,
int i,
SqlNode operand) |
| Modifier and Type | Method and Description |
|---|---|
R |
SqlBasicVisitor.ArgHandler.visitChild(SqlVisitor<R> visitor,
SqlNode expr,
int i,
SqlNode operand)
Visits a particular operand of a call, using a given visitor.
|
R |
SqlBasicVisitor.ArgHandlerImpl.visitChild(SqlVisitor<R> visitor,
SqlNode expr,
int i,
SqlNode operand) |
SqlNode |
SqlShuttle.CallCopyingArgHandler.visitChild(SqlVisitor<SqlNode> visitor,
SqlNode expr,
int i,
SqlNode operand) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlShuttle.CallCopyingArgHandler.visitChild(SqlVisitor<SqlNode> visitor,
SqlNode expr,
int i,
SqlNode operand) |
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.ImmutableList<SqlNode> |
AggregatingSelectScope.groupExprList
Use after construction is complete.
|
protected Map<SqlNode,SqlValidatorNamespace> |
SqlValidatorImpl.namespaces
|
protected Map<SqlNode,SqlValidatorScope> |
SqlValidatorImpl.scopes
Maps
query node objects to the SqlValidatorScope
scope created from them}. |
| Modifier and Type | Method and Description |
|---|---|
static SqlNode |
SqlValidatorUtil.addAlias(SqlNode expr,
String alias)
Converts an expression "expr" into "expr AS alias".
|
SqlNode |
SqlValidatorImpl.expand(SqlNode expr,
SqlValidatorScope scope) |
SqlNode |
SqlValidator.expand(SqlNode expr,
SqlValidatorScope scope)
Expands an expression.
|
SqlNode |
SqlValidatorImpl.expandOrderExpr(SqlSelect select,
SqlNode orderExpr) |
SqlNode |
SqlValidator.expandOrderExpr(SqlSelect select,
SqlNode orderExpr)
Expands an expression in the ORDER BY clause into an expression with the
same semantics as expressions in the SELECT clause.
|
protected SqlNode |
SqlValidatorImpl.getAggregate(SqlSelect select)
Returns the parse tree node (GROUP BY, HAVING, or an aggregate function
call) that causes
select to be an aggregate query, or null if it is
not an aggregate query. |
SqlNode |
SqlValidatorNamespace.getEnclosingNode()
Returns the parse tree node that at is at the root of this namespace and
includes all decorations.
|
SqlNode |
DelegatingNamespace.getEnclosingNode() |
SqlNode |
SqlValidatorNamespace.getNode()
Returns the parse tree node at the root of this namespace.
|
SqlNode |
SqlValidatorScope.getNode()
Returns the root node of this scope.
|
SqlNode |
TableConstructorNamespace.getNode() |
SqlNode |
WithNamespace.getNode() |
SqlNode |
ProcedureNamespace.getNode() |
SqlNode |
IdentifierNamespace.getNode() |
SqlNode |
DelegatingNamespace.getNode() |
SqlNode |
SetopNamespace.getNode() |
SqlNode |
OrderByScope.getNode() |
SqlNode |
OverScope.getNode() |
SqlNode |
AliasNamespace.getNode() |
SqlNode |
JoinScope.getNode() |
SqlNode |
AggregatingSelectScope.getNode() |
SqlNode |
CollectNamespace.getNode() |
SqlNode |
SqlValidatorImpl.getOriginal(SqlNode expr) |
protected SqlNode |
SqlValidatorImpl.getSelfJoinExprForUpdate(SqlNode table,
String alias)
Allows a subclass to provide information about how to convert an UPDATE
into a MERGE via self-join.
|
protected SqlNode |
SqlValidatorImpl.performUnconditionalRewrites(SqlNode node,
boolean underFrom)
Performs expression rewrites which are always used unconditionally.
|
SqlNode |
SqlValidatorImpl.validate(SqlNode topNode) |
SqlNode |
SqlValidator.validate(SqlNode topNode)
Validates an expression tree.
|
SqlNode |
SqlValidatorImpl.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap) |
SqlNode |
SqlValidator.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap)
Validates an expression tree.
|
SqlNode |
SqlScopedShuttle.visit(SqlCall call) |
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlDataTypeSpec type) |
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlDynamicParam param) |
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlIdentifier id) |
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlIntervalQualifier intervalQualifier) |
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlLiteral literal) |
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlNodeList list) |
protected SqlNode |
SqlValidatorUtil.DeepCopier.visitScoped(SqlCall call) |
protected SqlNode |
SqlScopedShuttle.visitScoped(SqlCall call)
Visits an operator call.
|
| Modifier and Type | Method and Description |
|---|---|
List<SqlNode> |
SelectScope.getExpandedSelectList() |
List<Pair<SqlNode,SqlMonotonicity>> |
SqlValidatorNamespace.getMonotonicExprs()
Returns a list of expressions which are monotonic in this namespace.
|
List<Pair<SqlNode,SqlMonotonicity>> |
IdentifierNamespace.getMonotonicExprs() |
List<Pair<SqlNode,SqlMonotonicity>> |
DelegatingNamespace.getMonotonicExprs() |
| Modifier and Type | Method and Description |
|---|---|
static SqlNode |
SqlValidatorUtil.addAlias(SqlNode expr,
String alias)
Converts an expression "expr" into "expr AS alias".
|
protected void |
SqlValidatorImpl.addToSelectList(List<SqlNode> list,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> fieldList,
SqlNode exp,
SqlValidatorScope scope,
boolean includeSystemVars)
Adds an expression to a select list, ensuring that its alias does not
clash with any existing expressions on the list.
|
static void |
SqlValidatorUtil.analyzeGroupItem(SqlValidatorScope scope,
List<SqlNode> groupExprs,
Map<Integer,Integer> groupExprProjection,
com.google.common.collect.ImmutableList.Builder<com.google.common.collect.ImmutableList<ImmutableBitSet>> topBuilder,
SqlNode groupExpr)
Analyzes an expression in a GROUP BY clause.
|
boolean |
AggregatingScope.checkAggregateExpr(SqlNode expr,
boolean deep)
Checks whether an expression is constant within the GROUP BY clause.
|
boolean |
AggregatingSelectScope.checkAggregateExpr(SqlNode expr,
boolean deep) |
protected void |
SqlValidatorImpl.checkTypeAssignment(RelDataType sourceRowType,
RelDataType targetRowType,
SqlNode query) |
protected SelectNamespace |
SqlValidatorImpl.createSelectNamespace(SqlSelect select,
SqlNode enclosingNode)
Creates a namespace for a
SELECT node. |
protected SetopNamespace |
SqlValidatorImpl.createSetopNamespace(SqlCall call,
SqlNode enclosingNode)
Creates a namespace for a set operation (
UNION,
INTERSECT, or EXCEPT). |
String |
SqlValidatorImpl.deriveAlias(SqlNode node,
int ordinal) |
String |
SqlValidator.deriveAlias(SqlNode node,
int ordinal)
Derives an alias for an expression.
|
RelDataType |
SqlValidatorImpl.deriveType(SqlValidatorScope scope,
SqlNode expr) |
RelDataType |
SqlValidator.deriveType(SqlValidatorScope scope,
SqlNode operand)
Derives the type of a node in a given scope.
|
SqlNode |
SqlValidatorImpl.expand(SqlNode expr,
SqlValidatorScope scope) |
SqlNode |
SqlValidator.expand(SqlNode expr,
SqlValidatorScope scope)
Expands an expression.
|
SqlNode |
SqlValidatorImpl.expandOrderExpr(SqlSelect select,
SqlNode orderExpr) |
SqlNode |
SqlValidator.expandOrderExpr(SqlSelect select,
SqlNode orderExpr)
Expands an expression in the ORDER BY clause into an expression with the
same semantics as expressions in the SELECT clause.
|
Pair<String,SqlValidatorNamespace> |
SqlValidatorScope.findQualifyingTableName(String columnName,
SqlNode ctx)
Finds the table alias which is implicitly qualifying an unqualified
column name.
|
Pair<String,SqlValidatorNamespace> |
DelegatingScope.findQualifyingTableName(String columnName,
SqlNode ctx) |
Pair<String,SqlValidatorNamespace> |
ListScope.findQualifyingTableName(String columnName,
SqlNode ctx) |
static String |
SqlValidatorUtil.getAlias(SqlNode node,
int ordinal)
Derives an alias for a node, and invents a mangled identifier if it
cannot.
|
List<List<String>> |
SqlValidatorImpl.getFieldOrigins(SqlNode sqlQuery) |
List<List<String>> |
SqlValidator.getFieldOrigins(SqlNode sqlQuery)
Returns a description of how each field in the row type maps to a
catalog, schema, table and column in the schema.
|
SqlValidatorScope |
SqlValidatorImpl.getJoinScope(SqlNode node) |
SqlValidatorScope |
SqlValidator.getJoinScope(SqlNode node)
Returns a scope containing the objects visible from the ON and USING
sections of a JOIN clause.
|
SqlMonotonicity |
SqlValidatorScope.getMonotonicity(SqlNode expr)
Returns whether an expression is monotonic in this scope.
|
SqlMonotonicity |
DelegatingScope.getMonotonicity(SqlNode expr) |
SqlMonotonicity |
SelectScope.getMonotonicity(SqlNode expr) |
SqlMonotonicity |
OverScope.getMonotonicity(SqlNode expr) |
SqlValidatorNamespace |
SqlValidatorImpl.getNamespace(SqlNode node) |
SqlValidatorNamespace |
SqlValidator.getNamespace(SqlNode node)
Finds the namespace corresponding to a given node.
|
SqlNode |
SqlValidatorImpl.getOriginal(SqlNode expr) |
SqlValidatorScope |
SqlValidatorImpl.getOverScope(SqlNode node) |
SqlValidatorScope |
SqlValidator.getOverScope(SqlNode node)
Returns the scope of an OVER or VALUES node.
|
RelDataType |
SqlValidatorImpl.getParameterRowType(SqlNode sqlQuery) |
RelDataType |
SqlValidator.getParameterRowType(SqlNode sqlQuery)
Returns a record type that contains the name and type of each parameter.
|
protected SqlNode |
SqlValidatorImpl.getSelfJoinExprForUpdate(SqlNode table,
String alias)
Allows a subclass to provide information about how to convert an UPDATE
into a MERGE via self-join.
|
RelDataType |
SqlValidatorImpl.getValidatedNodeType(SqlNode node) |
RelDataType |
SqlValidator.getValidatedNodeType(SqlNode node)
Returns the type assigned to a node by validation.
|
RelDataType |
SqlValidatorImpl.getValidatedNodeTypeIfKnown(SqlNode node) |
RelDataType |
SqlValidator.getValidatedNodeTypeIfKnown(SqlNode node)
Returns the type assigned to a node by validation, or null if unknown.
|
SqlValidatorScope |
SqlValidatorImpl.getWithScope(SqlNode withItem) |
SqlValidatorScope |
SqlValidator.getWithScope(SqlNode withItem) |
protected void |
SqlValidatorImpl.inferUnknownTypes(RelDataType inferredType,
SqlValidatorScope scope,
SqlNode node) |
boolean |
SqlValidatorImpl.isAggregate(SqlNode selectNode) |
boolean |
SqlValidator.isAggregate(SqlNode selectNode)
Returns whether a select list expression is an aggregate function.
|
boolean |
AggregatingSelectScope.isGroupingExpr(SqlNode operand)
Returns whether a given expression is equal to one of the grouping
expressions.
|
int |
AggregatingSelectScope.lookupGroupingExpr(SqlNode operand) |
List<SqlMoniker> |
SqlValidatorImpl.lookupHints(SqlNode topNode,
SqlParserPos pos) |
List<SqlMoniker> |
SqlValidatorWithHints.lookupHints(SqlNode topNode,
SqlParserPos pos)
Looks up completion hints for a syntactically correct SQL statement that
has been parsed into an expression tree.
|
SqlMoniker |
SqlValidatorImpl.lookupQualifiedName(SqlNode topNode,
SqlParserPos pos) |
SqlMoniker |
SqlValidatorWithHints.lookupQualifiedName(SqlNode topNode,
SqlParserPos pos)
Looks up the fully qualified name for a
SqlIdentifier at a given
Parser Position in a parsed expression tree Note: call this only after
SqlValidator.validate(org.apache.calcite.sql.SqlNode) has been called. |
CalciteContextException |
SqlValidatorImpl.newValidationError(SqlNode node,
Resources.ExInst<SqlValidatorException> e) |
CalciteContextException |
SqlValidator.newValidationError(SqlNode node,
Resources.ExInst<SqlValidatorException> e)
Adds "line x, column y" context to a validator exception.
|
RelDataType |
SqlValidatorScope.nullifyType(SqlNode node,
RelDataType type)
Converts the type of an expression to nullable, if the context
warrants it.
|
RelDataType |
DelegatingScope.nullifyType(SqlNode node,
RelDataType type) |
RelDataType |
AggregatingSelectScope.nullifyType(SqlNode node,
RelDataType type) |
protected SqlNode |
SqlValidatorImpl.performUnconditionalRewrites(SqlNode node,
boolean underFrom)
Performs expression rewrites which are always used unconditionally.
|
void |
SqlValidatorImpl.removeValidatedNodeType(SqlNode node) |
void |
SqlValidator.removeValidatedNodeType(SqlNode node)
Removes a node from the set of validated nodes
|
RelDataType |
SqlValidatorScope.resolveColumn(String name,
SqlNode ctx)
Resolves a single identifier to a column, and returns the datatype of
that column.
|
RelDataType |
DelegatingScope.resolveColumn(String name,
SqlNode ctx) |
RelDataType |
OrderByScope.resolveColumn(String name,
SqlNode ctx) |
RelDataType |
ListScope.resolveColumn(String columnName,
SqlNode ctx) |
SqlWindow |
SqlValidatorImpl.resolveWindow(SqlNode windowOrRef,
SqlValidatorScope scope,
boolean populateBounds) |
SqlWindow |
SqlValidator.resolveWindow(SqlNode windowOrRef,
SqlValidatorScope scope,
boolean populateBounds)
Converts a window specification or window name into a fully-resolved
window specification.
|
void |
SqlValidatorImpl.setOriginal(SqlNode expr,
SqlNode original) |
void |
SqlValidatorImpl.setValidatedNodeType(SqlNode node,
RelDataType type) |
void |
SqlValidator.setValidatedNodeType(SqlNode node,
RelDataType type)
Deprecated.
This method should not be in the
SqlValidator
interface. The validator should drive the type-derivation process, and
store nodes' types when they have been derived. |
protected static Pair<SqlIdentifier,SqlNodeList> |
IdentifierNamespace.split(SqlNode node) |
SqlNode |
SqlValidatorImpl.validate(SqlNode topNode) |
SqlNode |
SqlValidator.validate(SqlNode topNode)
Validates an expression tree.
|
void |
SqlValidatorScope.validateExpr(SqlNode expr)
Performs any scope-specific validation of an expression.
|
void |
DelegatingScope.validateExpr(SqlNode expr) |
void |
OrderByScope.validateExpr(SqlNode expr) |
void |
AggregatingSelectScope.validateExpr(SqlNode expr) |
protected void |
SqlValidatorImpl.validateFrom(SqlNode node,
RelDataType targetRowType,
SqlValidatorScope scope)
Validates the FROM clause of a query, or (recursively) a child node of
the FROM clause: AS, OVER, JOIN, VALUES, or subquery.
|
SqlNode |
SqlValidatorImpl.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap) |
SqlNode |
SqlValidator.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap)
Validates an expression tree.
|
void |
SqlValidatorImpl.validateQuery(SqlNode node,
SqlValidatorScope scope) |
void |
SqlValidator.validateQuery(SqlNode node,
SqlValidatorScope scope)
Checks that a query is valid.
|
protected void |
SqlValidatorImpl.validateWhereOrOn(SqlValidatorScope scope,
SqlNode condition,
String keyword) |
void |
SqlValidatorImpl.validateWindow(SqlNode windowOrId,
SqlValidatorScope scope,
SqlCall call) |
void |
SqlValidator.validateWindow(SqlNode windowOrId,
SqlValidatorScope scope,
SqlCall call)
Validates the right-hand side of an OVER expression.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
SqlValidatorImpl.addToSelectList(List<SqlNode> list,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> fieldList,
SqlNode exp,
SqlValidatorScope scope,
boolean includeSystemVars)
Adds an expression to a select list, ensuring that its alias does not
clash with any existing expressions on the list.
|
static void |
SqlValidatorUtil.analyzeGroupItem(SqlValidatorScope scope,
List<SqlNode> groupExprs,
Map<Integer,Integer> groupExprProjection,
com.google.common.collect.ImmutableList.Builder<com.google.common.collect.ImmutableList<ImmutableBitSet>> topBuilder,
SqlNode groupExpr)
Analyzes an expression in a GROUP BY clause.
|
static List<Object> |
SqlUserDefinedTableMacro.convertArguments(RelDataTypeFactory typeFactory,
List<SqlNode> operandList,
Function function,
SqlIdentifier opName,
boolean failOnNonLiteral)
Converts arguments from
SqlNode to
java object format. |
Type |
SqlUserDefinedTableFunction.getElementType(RelDataTypeFactory typeFactory,
List<SqlNode> operandList)
Returns the row type of the table yielded by this function when
applied to given arguments.
|
RelDataType |
SqlUserDefinedTableFunction.getRowType(RelDataTypeFactory typeFactory,
List<SqlNode> operandList)
Returns the record type of the table yielded by this function when
applied to given arguments.
|
TranslatableTable |
SqlUserDefinedTableMacro.getTable(RelDataTypeFactory typeFactory,
List<SqlNode> operandList)
Returns the table in this UDF, or null if there is no table.
|
void |
SelectScope.setExpandedSelectList(List<SqlNode> selectList) |
void |
SqlValidatorImpl.validateColumnListParams(SqlFunction function,
List<RelDataType> argTypes,
List<SqlNode> operands) |
void |
SqlValidator.validateColumnListParams(SqlFunction function,
List<RelDataType> argTypes,
List<SqlNode> operands)
Validates a COLUMN_LIST parameter
|
| Constructor and Description |
|---|
AliasNamespace(SqlValidatorImpl validator,
SqlCall call,
SqlNode enclosingNode)
Creates an AliasNamespace.
|
SelectNamespace(SqlValidatorImpl validator,
SqlSelect select,
SqlNode enclosingNode)
Creates a SelectNamespace.
|
SetopNamespace(SqlValidatorImpl validator,
SqlCall call,
SqlNode enclosingNode)
Creates a
SetopNamespace. |
SqlValidatorImpl.DmlNamespace(SqlValidatorImpl validator,
SqlNode id,
SqlNode enclosingNode,
SqlValidatorScope parentScope) |
| Modifier and Type | Method and Description |
|---|---|
Map<SqlNode,RexNode> |
SqlToRelConverter.getMapConvertedNonCorrSubqs() |
| Modifier and Type | Method and Description |
|---|---|
int |
SqlToRelConverter.AggConverter.addGroupExpr(SqlNode expr) |
protected boolean |
SqlToRelConverter.checkConvertedRowType(SqlNode query,
RelDataType convertedRowType) |
RexNode |
SqlRexContext.convertExpression(SqlNode expr)
|
RexNode |
SqlToRelConverter.convertExpression(SqlNode node)
|
RexNode |
SqlToRelConverter.Blackboard.convertExpression(SqlNode expr) |
RexNode |
SqlToRelConverter.convertExpression(SqlNode node,
Map<String,RexNode> nameToNodeMap)
|
protected RexNode |
SqlToRelConverter.convertExtendedExpression(SqlNode node,
SqlToRelConverter.Blackboard bb)
Converts a non-standard expression.
|
protected void |
SqlToRelConverter.convertFrom(SqlToRelConverter.Blackboard bb,
SqlNode from)
Converts a FROM clause into a relational expression.
|
protected void |
SqlToRelConverter.convertOrder(SqlSelect select,
SqlToRelConverter.Blackboard bb,
RelCollation collation,
List<SqlNode> orderExprList,
SqlNode offset,
SqlNode fetch)
Converts a query's ORDER BY clause, if any.
|
protected RelFieldCollation |
SqlToRelConverter.convertOrderItem(SqlSelect select,
SqlNode orderItem,
List<SqlNode> extraExprs,
RelFieldCollation.Direction direction,
RelFieldCollation.NullDirection nullDirection) |
RelNode |
SqlToRelConverter.convertQuery(SqlNode query,
boolean needsValidation,
boolean top)
Converts an unvalidated query's parse tree into a relational expression.
|
protected RelNode |
SqlToRelConverter.convertQueryRecursive(SqlNode query,
boolean top,
RelDataType targetRowType)
Recursively converts a query to a relational expression.
|
RexNode |
SqlToRelConverter.Blackboard.convertSortExpression(SqlNode expr,
Set<SqlKind> flags)
Converts an item in an ORDER BY clause, extracting DESC, NULLS LAST
and NULLS FIRST flags first.
|
RelNode |
SqlToRelConverter.convertToSingleValueSubq(SqlNode query,
RelNode plan)
Converts the RelNode tree for a select statement to a select that
produces a single value.
|
protected void |
SqlToRelConverter.createAggImpl(SqlToRelConverter.Blackboard bb,
SqlToRelConverter.AggConverter aggConverter,
SqlNodeList selectList,
SqlNodeList groupList,
SqlNode having,
List<SqlNode> orderExprList) |
RelNode |
SqlToRelConverter.decorrelate(SqlNode query,
RelNode rootRel)
If subquery is correlated and decorrelation is enabled, performs
decorrelation.
|
protected RelOptTable |
SqlToRelConverter.getTargetTable(SqlNode call) |
int |
SqlToRelConverter.AggConverter.lookupGroupExpr(SqlNode expr)
If an expression is structurally identical to one of the group-by
expressions, returns a reference to the expression, otherwise returns
null.
|
| Modifier and Type | Method and Description |
|---|---|
void |
SqlToRelConverter.addConvertedNonCorrSubqs(Map<SqlNode,RexNode> alreadyConvertedNonCorrSubqs)
Adds to the current map of non-correlated converted subqueries the
elements from another map that contains non-correlated subqueries that
have been converted by another SqlToRelConverter.
|
protected void |
SqlToRelConverter.convertAgg(SqlToRelConverter.Blackboard bb,
SqlSelect select,
List<SqlNode> orderExprList)
Converts the SELECT, GROUP BY and HAVING clauses of an aggregate query.
|
protected void |
SqlToRelConverter.convertOrder(SqlSelect select,
SqlToRelConverter.Blackboard bb,
RelCollation collation,
List<SqlNode> orderExprList,
SqlNode offset,
SqlNode fetch)
Converts a query's ORDER BY clause, if any.
|
protected RelFieldCollation |
SqlToRelConverter.convertOrderItem(SqlSelect select,
SqlNode orderItem,
List<SqlNode> extraExprs,
RelFieldCollation.Direction direction,
RelFieldCollation.NullDirection nullDirection) |
protected void |
SqlToRelConverter.createAggImpl(SqlToRelConverter.Blackboard bb,
SqlToRelConverter.AggConverter aggConverter,
SqlNodeList selectList,
SqlNodeList groupList,
SqlNode having,
List<SqlNode> orderExprList) |
protected void |
SqlToRelConverter.gatherOrderExprs(SqlToRelConverter.Blackboard bb,
SqlSelect select,
SqlNodeList orderList,
List<SqlNode> extraOrderExprs,
List<RelFieldCollation> collationList)
Creates a list of collations required to implement the ORDER BY clause,
if there is one.
|
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
Planner.parse(String sql)
Parses and validates a SQL statement.
|
SqlNode |
Planner.validate(SqlNode sqlNode)
Validates a SQL statement.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
Planner.convert(SqlNode sql)
Converts a SQL parse tree into a tree of relational expressions.
|
SqlNode |
Planner.validate(SqlNode sqlNode)
Validates a SQL statement.
|
Copyright © 2012–2015 The Apache Software Foundation. All rights reserved.