| Package | Description |
|---|---|
| org.apache.calcite.jdbc |
JDBC driver for Calcite.
|
| org.apache.calcite.materialize |
Management of materialized query results.
|
| org.apache.calcite.plan |
Defines interfaces for constructing rule-based optimizers of
relational expressions.
|
| org.apache.calcite.prepare |
Preparation of queries (parsing, planning and implementation).
|
| org.apache.calcite.rel.rel2sql |
Translates a relational expression to SQL parse tree.
|
| org.apache.calcite.rex |
Provides a language for representing row-expressions.
|
| org.apache.calcite.schema |
Schema SPI.
|
| org.apache.calcite.schema.impl |
Utilities to help implement Calcite's SPIs.
|
| 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.dialect |
SQL unparsers for JDBC dialects.
|
| 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.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 | Field and Description |
|---|---|
SqlNode |
CalcitePrepare.ParseResult.sqlNode |
| Modifier and Type | Method and Description |
|---|---|
void |
CalcitePrepare.executeDdl(CalcitePrepare.Context context,
SqlNode node)
Executes a DDL statement.
|
| Constructor and Description |
|---|
AnalyzeViewResult(CalcitePrepareImpl prepare,
SqlValidator validator,
String sql,
SqlNode sqlNode,
RelDataType rowType,
RelRoot root,
Table table,
com.google.common.collect.ImmutableList<String> tablePath,
RexNode constraint,
ImmutableIntList columnMapping,
boolean modifiable) |
ConvertResult(CalcitePrepareImpl prepare,
SqlValidator validator,
String sql,
SqlNode sqlNode,
RelDataType rowType,
RelRoot root) |
ParseResult(CalcitePrepareImpl prepare,
SqlValidator validator,
String sql,
SqlNode sqlNode,
RelDataType rowType) |
| Modifier and Type | Method and Description |
|---|---|
private static void |
Lattice.populateAliases(SqlNode from,
List<String> aliases,
String current) |
| Modifier and Type | Method and Description |
|---|---|
static void |
RelOptUtil.validateValueAgainstConstraint(SqlNode sourceValue,
RexNode targetConstraint,
com.google.common.base.Supplier<CalciteContextException> errorSupplier)
Ensures that a source value does not violate the constraint of the target
column.
|
| Modifier and Type | Field and Description |
|---|---|
private SqlNode |
PlannerImpl.validatedSqlNode |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
PlannerImpl.parse(String sql) |
SqlNode |
PlannerImpl.validate(SqlNode sqlNode) |
| Modifier and Type | Method and Description |
|---|---|
Pair<SqlNode,RelDataType> |
PlannerImpl.validateAndGetType(SqlNode sqlNode) |
| Modifier and Type | Method and Description |
|---|---|
private CalcitePrepare.AnalyzeViewResult |
CalcitePrepareImpl.analyze_(SqlValidator validator,
String sql,
SqlNode sqlNode,
RelRoot root,
boolean fail) |
private CalcitePrepare.ParseResult |
CalcitePrepareImpl.convert_(CalcitePrepare.Context context,
String sql,
boolean analyze,
boolean fail,
CalciteCatalogReader catalogReader,
SqlValidator validator,
SqlNode sqlNode1) |
RelNode |
PlannerImpl.convert(SqlNode sql) |
protected abstract RelNode |
Prepare.decorrelate(SqlToRelConverter sqlToRelConverter,
SqlNode query,
RelNode rootRel) |
protected RelNode |
CalcitePrepareImpl.CalcitePreparingStmt.decorrelate(SqlToRelConverter sqlToRelConverter,
SqlNode query,
RelNode rootRel) |
void |
CalcitePrepareImpl.executeDdl(CalcitePrepare.Context context,
SqlNode node) |
Prepare.PreparedResult |
Prepare.prepareSql(SqlNode sqlQuery,
Class runtimeContextClass,
SqlValidator validator,
boolean needsValidation) |
Prepare.PreparedResult |
Prepare.prepareSql(SqlNode sqlQuery,
SqlNode sqlNodeOriginal,
Class runtimeContextClass,
SqlValidator validator,
boolean needsValidation) |
RelRoot |
PlannerImpl.rel(SqlNode sql) |
SqlNode |
PlannerImpl.validate(SqlNode sqlNode) |
Pair<SqlNode,RelDataType> |
PlannerImpl.validateAndGetType(SqlNode sqlNode) |
| Modifier and Type | Field and Description |
|---|---|
(package private) SqlNode |
SqlImplementor.Result.node |
| Modifier and Type | Field and Description |
|---|---|
protected Map<String,SqlNode> |
SqlImplementor.ordinalMap |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlImplementor.Result.asFrom()
Returns a node that can be included in the FROM clause or a JOIN.
|
SqlNode |
SqlImplementor.Result.asQueryOrValues()
Converts a non-query node into a SELECT node.
|
SqlNode |
SqlImplementor.Result.asStatement()
Converts a non-query node into a SELECT node.
|
static SqlNode |
SqlImplementor.convertConditionToSqlNode(RexNode node,
SqlImplementor.Context leftContext,
SqlImplementor.Context rightContext,
int leftFieldCount)
|
private SqlNode |
SqlImplementor.Context.createLeftCall(SqlOperator op,
List<SqlNode> nodeList) |
private SqlNode |
SqlImplementor.Context.createSqlWindowBound(RexWindowBound rexWindowBound) |
abstract SqlNode |
SqlImplementor.Context.field(int ordinal) |
SqlNode |
SqlImplementor.AliasContext.field(int ordinal) |
SqlNode |
SqlImplementor.JoinContext.field(int ordinal) |
SqlNode |
SqlImplementor.Context.toSql(AggregateCall aggCall)
Converts a call to an aggregate function to an expression.
|
SqlNode |
SqlImplementor.Context.toSql(RelFieldCollation collation)
Converts a collation to an ORDER BY item.
|
private SqlNode |
SqlImplementor.Context.toSql(RexProgram program,
RexFieldCollation rfc) |
SqlNode |
SqlImplementor.Context.toSql(RexProgram program,
RexNode rex)
|
SqlNode |
SqlImplementor.MatchRecognizeContext.toSql(RexProgram program,
RexNode rex) |
| Modifier and Type | Method and Description |
|---|---|
List<SqlNode> |
SqlImplementor.Context.fieldList() |
private List<SqlNode> |
SqlImplementor.Context.toSql(RexProgram program,
List<RexNode> operandList) |
| Modifier and Type | Method and Description |
|---|---|
void |
RelToSqlConverter.addSelect(List<SqlNode> selectList,
SqlNode node,
RelDataType rowType) |
void |
SqlImplementor.addSelect(List<SqlNode> selectList,
SqlNode node,
RelDataType rowType) |
private SqlCall |
RelToSqlConverter.as(SqlNode e,
String alias) |
private void |
SqlImplementor.collectAliases(com.google.common.collect.ImmutableMap.Builder<String,RelDataType> builder,
SqlNode node,
Iterator<RelDataType> aliases) |
SqlImplementor.Result |
SqlImplementor.result(SqlNode node,
Collection<SqlImplementor.Clause> clauses,
RelNode rel,
Map<String,RelDataType> aliases)
Creates a result based on a single relational expression.
|
SqlImplementor.Result |
SqlImplementor.result(SqlNode join,
SqlImplementor.Result leftResult,
SqlImplementor.Result rightResult)
Creates a result based on a join.
|
void |
SqlImplementor.Builder.setFetch(SqlNode fetch) |
void |
SqlImplementor.Builder.setHaving(SqlNode node) |
void |
SqlImplementor.Builder.setOffset(SqlNode offset) |
void |
SqlImplementor.Builder.setWhere(SqlNode node) |
(package private) SqlSelect |
SqlImplementor.wrapSelect(SqlNode node)
Wraps a node in a SELECT statement that has no clauses:
"SELECT ...
|
| Modifier and Type | Method and Description |
|---|---|
void |
SqlImplementor.Builder.addOrderItem(List<SqlNode> orderByList,
RelFieldCollation field) |
void |
RelToSqlConverter.addSelect(List<SqlNode> selectList,
SqlNode node,
RelDataType rowType) |
void |
SqlImplementor.addSelect(List<SqlNode> selectList,
SqlNode node,
RelDataType rowType) |
private SqlNode |
SqlImplementor.Context.createLeftCall(SqlOperator op,
List<SqlNode> nodeList) |
| Constructor and Description |
|---|
Result(SqlNode node,
Collection<SqlImplementor.Clause> clauses,
String neededAlias,
RelDataType neededType,
Map<String,RelDataType> aliases) |
| Modifier and Type | Field and Description |
|---|---|
private SqlNode |
RexWindowBound.RexWindowBoundUnbounded.node |
| 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 |
RexSqlStandardConvertletTable.EquivConvertlet.convertCall(RexToSqlNodeConverter converter,
RexCall call) |
SqlNode |
RexSqlConvertlet.convertCall(RexToSqlNodeConverter converter,
RexCall call)
|
private SqlNode[] |
RexSqlStandardConvertletTable.convertExpressionList(RexToSqlNodeConverter converter,
List<RexNode> nodes) |
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.
|
| Constructor and Description |
|---|
RexWindowBoundUnbounded(SqlNode node) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
Table.rolledUpColumnValidInsideAgg(String column,
SqlCall call,
SqlNode parent,
CalciteConnectionConfig config)
Determines whether the given rolled up column can be used inside the given aggregate function.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
AbstractTable.rolledUpColumnValidInsideAgg(String column,
SqlCall call,
SqlNode parent,
CalciteConnectionConfig config) |
| Modifier and Type | Class and Description |
|---|---|
class |
SqlAbstractDateTimeLiteral
A SQL literal representing a DATE, TIME or TIMESTAMP value.
|
(package private) class |
SqlAbstractStringLiteral
Abstract base for character and binary string literals.
|
class |
SqlAlter
Base class for an ALTER statements parse tree nodes.
|
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 |
SqlCreate
Base class for an CREATE statements parse tree nodes.
|
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 |
SqlDdl
Base class for CREATE, DROP and other DDL statements.
|
class |
SqlDelete
A
SqlDelete is a node of a parse tree which represents a DELETE
statement. |
class |
SqlDescribeSchema
A
SqlDescribeSchema is a node of a parse tree that represents a
DESCRIBE SCHEMA statement. |
class |
SqlDescribeTable
A
SqlDescribeTable is a node of a parse tree that represents a
DESCRIBE TABLE statement. |
class |
SqlDrop
Base class for an DROP statements parse tree nodes.
|
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 |
SqlMatchRecognize
SqlNode for MATCH_RECOGNIZE clause.
|
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
SET and RESET statements,
optionally preceded by ALTER SYSTEM or ALTER SESSION. |
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 |
|---|---|
private SqlNode |
SqlMatchRecognize.after |
SqlNode |
SqlWith.body |
(package private) SqlNode |
SqlUpdate.condition |
(package private) SqlNode |
SqlMerge.condition |
(package private) SqlNode |
SqlJoin.condition |
(package private) SqlNode |
SqlDelete.condition |
static SqlNode[] |
SqlNode.EMPTY_ARRAY |
(package private) SqlNode |
SqlExplain.explicandum |
(package private) SqlNode |
SqlSelect.fetch |
SqlNode |
SqlOrderBy.fetch |
(package private) SqlNode |
SqlSelect.from |
(package private) SqlNode |
SqlSelect.having |
(package private) SqlNode |
SqlJoin.left |
(package private) SqlNode |
SqlWindow.lowerBound
The lower bound of the window.
|
SqlNode |
SqlSpecialOperator.ReduceResult.node |
(package private) SqlNode |
SqlSelect.offset |
SqlNode |
SqlOrderBy.offset |
SqlNode[] |
SqlBasicCall.operands |
private SqlNode |
SqlMatchRecognize.pattern |
SqlNode |
SqlOrderBy.query |
SqlNode |
SqlWithItem.query |
(package private) SqlNode |
SqlJoin.right |
(package private) SqlNode |
SqlInsert.source |
(package private) SqlNode |
SqlMerge.source |
private SqlNode |
SqlMatchRecognize.tableRef |
(package private) SqlNode |
SqlInsert.targetTable |
(package private) SqlNode |
SqlUpdate.targetTable |
(package private) SqlNode |
SqlMerge.targetTable |
(package private) SqlNode |
SqlDelete.targetTable |
private SqlNode[] |
SqlJdbcFunctionCall.thisOperands |
(package private) SqlNode |
SqlWindow.upperBound
The upper bound of the window.
|
(package private) SqlNode |
SqlSetOption.value
Value of the option.
|
(package private) SqlNode |
SqlSelect.where |
| Modifier and Type | Field and Description |
|---|---|
private List<SqlNode> |
SqlUtil.Genealogist.ancestors |
private List<SqlNode> |
SqlNodeList.list |
private com.google.common.base.Predicate<SqlNode> |
SqlUtil.Genealogist.postPredicate |
private com.google.common.base.Predicate<SqlNode> |
SqlUtil.Genealogist.predicate |
| Modifier and Type | Method and Description |
|---|---|
static <E extends SqlNode> |
SqlNode.clone(E e)
Creates a copy of a SqlNode.
|
<S extends SqlNode> |
SqlBasicCall.operand(int i) |
<S extends SqlNode> |
SqlCall.operand(int i) |
| Modifier and Type | Method and Description |
|---|---|
(package private) static SqlNode |
SqlUtil.andExpressions(SqlNode node1,
SqlNode node2) |
SqlNode |
SqlIdentifier.clone(SqlParserPos pos) |
SqlNode |
SqlDynamicParam.clone(SqlParserPos pos) |
SqlNode |
SqlBasicCall.clone(SqlParserPos pos) |
SqlNode |
SqlCall.clone(SqlParserPos pos) |
SqlNode |
SqlIntervalQualifier.clone(SqlParserPos pos) |
abstract SqlNode |
SqlNode.clone(SqlParserPos pos)
Clones a SqlNode with a different position.
|
SqlNode |
SqlDataTypeSpec.clone(SqlParserPos pos) |
static SqlNode[] |
SqlNode.cloneArray(SqlNode[] nodes)
Deprecated.
|
static SqlNode |
SqlWindow.createBound(SqlLiteral range) |
static SqlNode |
SqlWindow.createCurrentRow(SqlParserPos pos) |
SqlNode |
SqlJdbcDataTypeName.createDataType(SqlParserPos pos)
Creates a parse tree node for a type identifier of this name.
|
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 |
SqlDialect.emulateNullDirection(SqlNode node,
boolean nullsFirst,
boolean desc)
Returns the SqlNode for emulating the null direction for the given field
or
null if no emulation needs to be done. |
protected SqlNode |
SqlDialect.emulateNullDirectionWithIsNull(SqlNode node,
boolean nullsFirst,
boolean desc) |
SqlNode |
SqlNodeList.get(int n) |
SqlNode |
SqlMatchRecognize.getAfter() |
SqlNode |
SqlDialect.getCastSpec(RelDataType type) |
SqlNode |
SqlUpdate.getCondition()
Gets the filter condition for rows to be updated.
|
SqlNode |
SqlMerge.getCondition() |
SqlNode |
SqlJoin.getCondition() |
SqlNode |
SqlDelete.getCondition()
Gets the filter condition for rows to be deleted.
|
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 |
SqlMatchRecognize.getPattern() |
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 |
SqlMatchRecognize.getTableRef() |
SqlNode |
SqlInsert.getTargetTable() |
SqlNode |
SqlUpdate.getTargetTable() |
SqlNode |
SqlMerge.getTargetTable() |
SqlNode |
SqlDelete.getTargetTable() |
SqlNode |
SqlWindow.getUpperBound() |
SqlNode |
SqlSetOption.getValue() |
SqlNode |
SqlSelect.getWhere() |
SqlNode |
SqlSpecialOperator.TokenSequence.node(int i) |
SqlNode |
SqlCallBinding.operand(int i)
Returns a particular operand.
|
protected SqlNode[] |
SqlJdbcFunctionCall.PermutingMakeCall.reorder(SqlNode[] operands)
Uses the data in
SqlJdbcFunctionCall.PermutingMakeCall.order to reorder a SqlNode[] array. |
SqlNode |
SqlOperator.rewriteCall(SqlValidator validator,
SqlCall call)
Rewrites a call to this operator.
|
SqlNode |
SqlProcedureCallOperator.rewriteCall(SqlValidator validator,
SqlCall call) |
SqlNode |
SqlJdbcFunctionCall.rewriteCall(SqlValidator validator,
SqlCall call) |
SqlNode |
SqlDialect.rewriteSingleValueExpr(SqlNode aggCall)
Rewrite SINGLE_VALUE into expression based on database variants
E.g.
|
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 |
SqlWindow.Bound.symbol(SqlParserPos pos)
Creates a parse-tree node representing an occurrence of this bound
type at a particular position in the parsed text.
|
SqlNode[] |
SqlNodeList.toArray() |
| Modifier and Type | Method and Description |
|---|---|
protected List<SqlNode> |
SqlOperator.constructOperandList(SqlValidator validator,
SqlCall call,
List<String> argNames) |
(package private) static ArrayList<SqlNode> |
SqlUtil.flatten(SqlNode node) |
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> |
SqlSelect.getOperandList() |
List<SqlNode> |
SqlOrderBy.getOperandList() |
List<SqlNode> |
SqlInsert.getOperandList() |
List<SqlNode> |
SqlWindow.getOperandList() |
List<SqlNode> |
SqlUpdate.getOperandList() |
List<SqlNode> |
SqlBasicCall.getOperandList() |
abstract List<SqlNode> |
SqlCall.getOperandList() |
List<SqlNode> |
SqlDescribeTable.getOperandList() |
List<SqlNode> |
SqlWithItem.getOperandList() |
List<SqlNode> |
SqlMerge.getOperandList() |
List<SqlNode> |
SqlDescribeSchema.getOperandList() |
List<SqlNode> |
SqlSetOption.getOperandList() |
List<SqlNode> |
SqlExplain.getOperandList() |
List<SqlNode> |
SqlMatchRecognize.getOperandList() |
List<SqlNode> |
SqlJoin.getOperandList() |
List<SqlNode> |
SqlWith.getOperandList() |
List<SqlNode> |
SqlDelete.getOperandList() |
Iterator<SqlNode> |
SqlNodeList.iterator() |
List<SqlNode> |
SqlCallBinding.operands()
Returns the operands to a call permuted into the same order as the
formal parameters of the function.
|
private List<SqlNode> |
SqlCallBinding.permutedOperands(SqlCall call)
Returns the operands to a call permuted into the same order as the
formal parameters of the function.
|
| Modifier and Type | Method and Description |
|---|---|
void |
SqlNodeList.add(SqlNode node) |
(package private) static SqlNode |
SqlUtil.andExpressions(SqlNode node1,
SqlNode node2) |
private Void |
SqlUtil.Genealogist.check(SqlNode node) |
static SqlNode[] |
SqlNode.cloneArray(SqlNode[] nodes)
Deprecated.
|
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 |
SqlWindow.SqlWindowOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlWithItem.SqlWithItemOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlSelectOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlMatchRecognize.SqlMatchRecognizeOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlJoin.SqlJoinOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlWith.SqlWithOperator.createCall(SqlLiteral functionQualifier,
SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlJdbcFunctionCall.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.
|
SqlCall |
SqlJdbcFunctionCall.MakeCall.createCall(SqlParserPos pos,
SqlNode... operands)
Creates and return a
SqlCall. |
SqlCall |
SqlJdbcFunctionCall.SimpleMakeCall.createCall(SqlParserPos pos,
SqlNode... operands) |
SqlCall |
SqlJdbcFunctionCall.PermutingMakeCall.createCall(SqlParserPos pos,
SqlNode... operands) |
static SqlNode |
SqlWindow.createFollowing(SqlNode e,
SqlParserPos pos) |
static SqlNode |
SqlWindow.createPreceding(SqlNode e,
SqlParserPos pos) |
SqlNode |
SqlDialect.emulateNullDirection(SqlNode node,
boolean nullsFirst,
boolean desc)
Returns the SqlNode for emulating the null direction for the given field
or
null if no emulation needs to be done. |
protected SqlNode |
SqlDialect.emulateNullDirectionWithIsNull(SqlNode node,
boolean nullsFirst,
boolean desc) |
static boolean |
SqlNode.equalDeep(SqlNode node1,
SqlNode node2,
Litmus litmus)
Returns whether two nodes are equal (using
equalsDeep(SqlNode, Litmus)) or are both null. |
boolean |
SqlNode.equalsDeep(SqlNode node,
boolean fail)
Deprecated.
|
boolean |
SqlIdentifier.equalsDeep(SqlNode node,
Litmus litmus) |
boolean |
SqlWindow.equalsDeep(SqlNode node,
Litmus litmus)
Overridden method to specifically check only the right subtree of a window
definition.
|
boolean |
SqlDynamicParam.equalsDeep(SqlNode node,
Litmus litmus) |
boolean |
SqlCall.equalsDeep(SqlNode node,
Litmus litmus) |
boolean |
SqlLiteral.equalsDeep(SqlNode node,
Litmus litmus) |
boolean |
SqlIntervalQualifier.equalsDeep(SqlNode node,
Litmus litmus) |
abstract boolean |
SqlNode.equalsDeep(SqlNode node,
Litmus litmus)
Returns whether this node is structurally equivalent to another node.
|
boolean |
SqlNodeList.equalsDeep(SqlNode node,
Litmus litmus) |
boolean |
SqlDataTypeSpec.equalsDeep(SqlNode node,
Litmus litmus) |
void |
SqlWriter.fetchOffset(SqlNode fetch,
SqlNode offset)
Prints the OFFSET/FETCH clause.
|
(package private) static ArrayList<SqlNode> |
SqlUtil.flatten(SqlNode node) |
private static void |
SqlUtil.flatten(SqlNode node,
ArrayList<SqlNode> list) |
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.isLiteral(SqlNode node,
boolean allowCast)
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 SqlNodeList |
SqlNodeList.of(SqlNode node1) |
static SqlNodeList |
SqlNodeList.of(SqlNode node1,
SqlNode node2) |
static SqlNodeList |
SqlNodeList.of(SqlNode node1,
SqlNode node2,
SqlNode... nodes) |
static SqlNodeList |
SqlNodeList.of(SqlNode node1,
SqlNode node2,
SqlNode... nodes) |
private Void |
SqlUtil.Genealogist.postCheck(SqlNode node) |
private Void |
SqlUtil.Genealogist.preCheck(SqlNode node) |
protected SqlNode[] |
SqlJdbcFunctionCall.PermutingMakeCall.reorder(SqlNode[] operands)
Uses the data in
SqlJdbcFunctionCall.PermutingMakeCall.order to reorder a SqlNode[] array. |
void |
SqlSpecialOperator.TokenSequence.replaceSublist(int start,
int end,
SqlNode e) |
SqlNode |
SqlDialect.rewriteSingleValueExpr(SqlNode aggCall)
Rewrite SINGLE_VALUE into expression based on database variants
E.g.
|
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 |
SqlSelect.setHaving(SqlNode having) |
void |
SqlJoin.setLeft(SqlNode left) |
void |
SqlWindow.setLowerBound(SqlNode lowerBound) |
void |
SqlSelect.setOffset(SqlNode offset) |
void |
SqlSelect.setOperand(int i,
SqlNode operand) |
void |
SqlInsert.setOperand(int i,
SqlNode operand) |
void |
SqlWindow.setOperand(int i,
SqlNode operand) |
void |
SqlUpdate.setOperand(int i,
SqlNode operand) |
void |
SqlBasicCall.setOperand(int i,
SqlNode operand) |
void |
SqlCall.setOperand(int i,
SqlNode operand)
Changes the value of an operand.
|
void |
SqlDescribeTable.setOperand(int i,
SqlNode operand) |
void |
SqlWithItem.setOperand(int i,
SqlNode operand) |
void |
SqlMerge.setOperand(int i,
SqlNode operand) |
void |
SqlDescribeSchema.setOperand(int i,
SqlNode operand) |
void |
SqlSetOption.setOperand(int i,
SqlNode operand) |
void |
SqlExplain.setOperand(int i,
SqlNode operand) |
void |
SqlMatchRecognize.setOperand(int i,
SqlNode operand) |
void |
SqlJoin.setOperand(int i,
SqlNode operand) |
void |
SqlWith.setOperand(int i,
SqlNode operand) |
void |
SqlDelete.setOperand(int i,
SqlNode operand) |
private static boolean |
SqlWindow.setOperand(SqlNode clonedOperand,
SqlNode thatOperand,
SqlValidator validator) |
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)
Deprecated.
|
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 |
SqlDialect.unparseFetchUsingAnsi(SqlWriter writer,
SqlNode offset,
SqlNode fetch)
Unparses offset/fetch using ANSI standard "OFFSET offset ROWS FETCH NEXT
fetch ROWS ONLY" syntax.
|
protected void |
SqlDialect.unparseFetchUsingLimit(SqlWriter writer,
SqlNode offset,
SqlNode fetch)
Unparses offset/fetch using "LIMIT fetch OFFSET offset" syntax.
|
protected void |
SqlOperator.unparseListClause(SqlWriter writer,
SqlNode clause) |
protected void |
SqlOperator.unparseListClause(SqlWriter writer,
SqlNode clause,
SqlKind sepKind) |
void |
SqlDialect.unparseOffsetFetch(SqlWriter writer,
SqlNode offset,
SqlNode fetch)
Converts an offset and fetch into SQL.
|
private void |
SqlWindow.validateFrameBoundary(SqlNode bound,
boolean isRows,
SqlTypeFamily orderTypeFam,
SqlValidator validator,
SqlValidatorScope scope) |
static Comparable |
SqlLiteral.value(SqlNode node)
Extracts the value from a literal.
|
private void |
SqlUtil.Genealogist.visitChild(SqlNode node) |
| Modifier and Type | Method and Description |
|---|---|
protected List<RelDataType> |
SqlOperator.constructArgTypeList(SqlValidator validator,
SqlValidatorScope scope,
SqlCall call,
List<SqlNode> args,
boolean convertRowArgToColumnList) |
private boolean |
SqlFunction.containsRowArg(List<SqlNode> args) |
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,
Litmus litmus)
Returns whether two lists of operands are equal.
|
static boolean |
SqlNode.equalDeep(List<SqlNode> operands0,
List<SqlNode> operands1,
Litmus litmus)
Returns whether two lists of operands are equal.
|
private static void |
SqlUtil.flatten(SqlNode node,
ArrayList<SqlNode> list) |
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 |
|---|
ReduceResult(int startOrdinal,
int endOrdinal,
SqlNode node) |
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 format,
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) |
SqlMatchRecognize(SqlParserPos pos,
SqlNode tableRef,
SqlNode pattern,
SqlLiteral strictStart,
SqlLiteral strictEnd,
SqlNodeList patternDefList,
SqlNodeList measureList,
SqlNode after,
SqlNodeList subsetList,
SqlLiteral rowsPerMatch,
SqlNodeList partitionList,
SqlNodeList orderList,
SqlLiteral interval)
Creates a SqlMatchRecognize.
|
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,
SqlIdentifier 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 |
|---|
Genealogist(com.google.common.base.Predicate<SqlNode> predicate,
com.google.common.base.Predicate<SqlNode> postPredicate) |
Genealogist(com.google.common.base.Predicate<SqlNode> predicate,
com.google.common.base.Predicate<SqlNode> postPredicate) |
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. |
private SqlNode |
SqlAdvisor.tryParse(String sql,
List<SqlMoniker> hintList)
Tries to parse a SQL statement.
|
| 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) |
private static boolean |
SqlAdvisor.isSelectListItem(SqlNode root,
SqlParserPos pos) |
protected void |
SqlAdvisorValidator.validateFrom(SqlNode node,
RelDataType targetRowType,
SqlValidatorScope scope) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
JethroDataSqlDialect.emulateNullDirection(SqlNode node,
boolean nullsFirst,
boolean desc) |
SqlNode |
HiveSqlDialect.emulateNullDirection(SqlNode node,
boolean nullsFirst,
boolean desc) |
SqlNode |
MysqlSqlDialect.emulateNullDirection(SqlNode node,
boolean nullsFirst,
boolean desc) |
SqlNode |
MysqlSqlDialect.getCastSpec(RelDataType type) |
SqlNode |
HsqldbSqlDialect.rewriteSingleValueExpr(SqlNode aggCall) |
SqlNode |
MysqlSqlDialect.rewriteSingleValueExpr(SqlNode aggCall) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
JethroDataSqlDialect.emulateNullDirection(SqlNode node,
boolean nullsFirst,
boolean desc) |
SqlNode |
HiveSqlDialect.emulateNullDirection(SqlNode node,
boolean nullsFirst,
boolean desc) |
SqlNode |
MysqlSqlDialect.emulateNullDirection(SqlNode node,
boolean nullsFirst,
boolean desc) |
SqlNode |
HsqldbSqlDialect.rewriteSingleValueExpr(SqlNode aggCall) |
SqlNode |
MysqlSqlDialect.rewriteSingleValueExpr(SqlNode aggCall) |
void |
HsqldbSqlDialect.unparseOffsetFetch(SqlWriter writer,
SqlNode offset,
SqlNode fetch) |
void |
HiveSqlDialect.unparseOffsetFetch(SqlWriter writer,
SqlNode offset,
SqlNode fetch) |
void |
RedshiftSqlDialect.unparseOffsetFetch(SqlWriter writer,
SqlNode offset,
SqlNode fetch) |
void |
MysqlSqlDialect.unparseOffsetFetch(SqlWriter writer,
SqlNode offset,
SqlNode fetch) |
| 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 | Field and Description |
|---|---|
(package private) SqlNode |
SqlCase.elseExpr |
(package private) SqlNode |
SqlCase.value |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
SqlCase.getElseOperand() |
SqlNode |
SqlCase.getValueOperand() |
SqlNode |
SqlCoalesceFunction.rewriteCall(SqlValidator validator,
SqlCall call) |
SqlNode |
SqlDatePartFunction.rewriteCall(SqlValidator validator,
SqlCall call) |
SqlNode |
SqlNullifFunction.rewriteCall(SqlValidator validator,
SqlCall call) |
SqlNode |
SqlNewOperator.rewriteCall(SqlValidator validator,
SqlCall call) |
| Modifier and Type | Method and Description |
|---|---|
static List<Pair<SqlNode,AuxiliaryConverter>> |
SqlStdOperatorTable.convertGroupToAuxiliaryCalls(SqlCall call)
Converts a call to a grouped window function to a call to its auxiliary
window function(s).
|
List<SqlNode> |
SqlCase.getOperandList() |
| Modifier and Type | Method and Description |
|---|---|
(package private) boolean |
SqlBetweenOperator.AndFinder.containsAnd(SqlNode node) |
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 | Field and Description |
|---|---|
private static com.google.common.base.Function<SqlNode,SqlParserPos> |
SqlParserPos.NODE_TO_POS |
| Modifier and Type | Method and Description |
|---|---|
private static SqlNode |
SqlParserUtil.convert(PrecedenceClimbingParser.Token token) |
SqlNode |
SqlParserUtil.TokenSequenceImpl.node(int i) |
SqlNode |
SqlParserUtil.OldTokenSequenceImpl.node(int i) |
SqlNode |
SqlParser.parseExpression()
Parses a SQL expression.
|
SqlNode |
SqlParser.parseQuery()
Parses a
SELECT statement. |
SqlNode |
SqlParser.parseQuery(String sql)
Parses a
SELECT statement and reuses parser. |
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(SqlSpecialOperator.TokenSequence 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 |
|---|---|
Span |
Span.add(SqlNode n)
Adds a node's position to the list,
and returns this Span.
|
Span |
Span.addIf(SqlNode n)
Adds a node's position to the list if the node is not null,
and returns this Span.
|
protected SqlCall |
SqlAbstractParserImpl.createCall(SqlIdentifier funName,
SqlParserPos pos,
SqlFunctionCategory funcType,
SqlLiteral functionQualifier,
SqlNode[] operands)
Creates a call.
|
SqlParserPos |
Span.end(SqlNode n)
Adds a node's position to the list,
and returns a position that covers the whole range.
|
static Span |
Span.of(SqlNode n)
Creates a Span of one node.
|
static Span |
Span.of(SqlNode n0,
SqlNode n1)
Creates a Span between two nodes.
|
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.
|
void |
SqlParserUtil.TokenSequenceImpl.replaceSublist(int start,
int end,
SqlNode e) |
void |
SqlParserUtil.OldTokenSequenceImpl.replaceSublist(int start,
int end,
SqlNode e) |
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.
|
private static List<SqlParserPos> |
SqlParserPos.toPos(SqlNode[] nodes) |
| Modifier and Type | Method and Description |
|---|---|
Span |
Span.addAll(Iterable<? extends SqlNode> nodes)
Adds the positions of a collection of nodes to the list,
and returns this Span.
|
protected SqlCall |
SqlAbstractParserImpl.createCall(SqlIdentifier funName,
SqlParserPos pos,
SqlFunctionCategory funcType,
SqlLiteral functionQualifier,
Iterable<? extends SqlNode> operands)
Creates a call.
|
static Span |
Span.of(Collection<? extends SqlNode> nodes)
Creates a Span of a list of nodes.
|
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) |
private static Iterable<SqlParserPos> |
SqlParserPos.toPos(Iterable<SqlNode> nodes) |
| Modifier and Type | Method and Description |
|---|---|
void |
SqlPrettyWriter.fetchOffset(SqlNode fetch,
SqlNode offset) |
String |
SqlPrettyWriter.format(SqlNode node) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
boolean |
SameOperandTypeChecker.checkSingleOperandType(SqlCallBinding callBinding,
SqlNode operand,
int iFormalOperand,
boolean throwOnFailure) |
boolean |
OperandTypes.PeriodOperandTypeChecker.checkSingleOperandType(SqlCallBinding callBinding,
SqlNode node,
int iFormalOperand,
boolean throwOnFailure) |
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) |
| 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 | Field and Description |
|---|---|
(package private) SqlNode[] |
SqlShuttle.CallCopyingArgHandler.clonedOperands |
| 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 |
|---|---|
protected SqlNode |
AbstractNamespace.enclosingNode |
private SqlNode |
TableScope.node |
(package private) SqlNode |
SqlValidatorImpl.NavigationExpander.offset |
private SqlNode |
SqlValidatorImpl.OrderExpressionExpander.root |
(package private) SqlNode |
SqlValidatorImpl.ExtendedExpander.root |
private SqlNode |
SqlValidatorImpl.ValidationError.sqlNode |
private SqlNode |
SqlValidatorImpl.top |
| Modifier and Type | Field and Description |
|---|---|
private Set<SqlNode> |
SqlValidatorImpl.cursorSet
Set of select expressions used as cursor definitions.
|
private List<SqlNode> |
SelectScope.expandedSelectList |
com.google.common.collect.ImmutableList<SqlNode> |
AggregatingSelectScope.Resolved.extraExprList |
(package private) List<SqlNode> |
SqlValidatorUtil.GroupAnalyzer.extraExprs
Extra expressions, computed from the input as extra GROUP BY
expressions.
|
private List<SqlNode> |
AggChecker.extraExprs |
com.google.common.collect.ImmutableList<SqlNode> |
AggregatingSelectScope.Resolved.groupExprList |
(package private) List<SqlNode> |
SqlValidatorUtil.GroupAnalyzer.groupExprs |
private List<SqlNode> |
AggChecker.groupExprs |
private List<Pair<SqlNode,SqlMonotonicity>> |
IdentifierNamespace.monotonicExprs
List of monotonic expressions.
|
protected Map<SqlNode,SqlValidatorNamespace> |
SqlValidatorImpl.namespaces
|
private Map<SqlNode,RelDataType> |
SqlValidatorImpl.nodeToTypeMap
Map of derived RelDataType for each node.
|
private Map<SqlNode,SqlNode> |
SqlValidatorImpl.originalExprs |
private Map<SqlNode,SqlNode> |
SqlValidatorImpl.originalExprs |
protected Map<SqlNode,SqlValidatorScope> |
SqlValidatorImpl.scopes
Maps
query node objects to the SqlValidatorScope
scope created from them. |
private List<SqlNode> |
AggregatingSelectScope.temporaryGroupExprList
Use while under construction.
|
| Modifier and Type | Method and Description |
|---|---|
static SqlNode |
SqlValidatorUtil.addAlias(SqlNode expr,
String alias)
Converts an expression "expr" into "expr AS alias".
|
(package private) SqlNode |
SqlValidatorUtil.GroupAnalyzer.createGroupExpr() |
SqlNode |
SqlValidator.expand(SqlNode expr,
SqlValidatorScope scope)
Expands an expression.
|
SqlNode |
SqlValidatorImpl.expand(SqlNode expr,
SqlValidatorScope scope) |
SqlNode |
SqlValidatorImpl.expandGroupByOrHavingExpr(SqlNode expr,
SqlValidatorScope scope,
SqlSelect select,
boolean havingExpression) |
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.
|
SqlNode |
SqlValidatorImpl.expandOrderExpr(SqlSelect select,
SqlNode orderExpr) |
private SqlNode |
SqlValidatorImpl.getAgg(SqlSelect select)
If there is at least one call to an aggregate function, returns the
first.
|
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 |
AbstractNamespace.getEnclosingNode() |
SqlNode |
DelegatingNamespace.getEnclosingNode() |
SqlNode |
SqlValidatorNamespace.getEnclosingNode()
Returns the parse tree node that at is at the root of this namespace and
includes all decorations.
|
SqlNode |
TableConstructorNamespace.getNode() |
SqlNode |
OrderByScope.getNode() |
SqlNode |
SetopNamespace.getNode() |
SqlNode |
WithScope.getNode() |
SqlNode |
SqlValidatorScope.getNode()
Returns the root node of this scope.
|
SqlNode |
WithNamespace.getNode() |
SqlNode |
DelegatingNamespace.getNode() |
SqlNode |
AliasNamespace.getNode() |
SqlNode |
AggregatingSelectScope.getNode() |
SqlNode |
UnnestNamespace.getNode() |
SqlNode |
MatchRecognizeScope.getNode() |
SqlNode |
EmptyScope.getNode() |
SqlNode |
ProcedureNamespace.getNode() |
SqlNode |
JoinScope.getNode() |
SqlNode |
SqlValidatorNamespace.getNode()
Returns the parse tree node at the root of this namespace.
|
SqlNode |
FieldNamespace.getNode() |
SqlNode |
CollectScope.getNode() |
SqlNode |
TableNamespace.getNode() |
SqlNode |
WithItemNamespace.getNode() |
SqlNode |
IdentifierNamespace.getNode() |
SqlNode |
OverScope.getNode() |
SqlNode |
CollectNamespace.getNode() |
SqlNode |
ParameterNamespace.getNode() |
SqlNode |
TableScope.getNode() |
SqlNode |
SchemaNamespace.getNode() |
SqlNode |
JoinNamespace.getNode() |
SqlNode |
GroupByScope.getNode() |
SqlNode |
CatalogScope.getNode() |
private SqlNode |
SqlValidatorImpl.getNthExpr(SqlNode query,
int ordinal,
int sourceCount)
Locates the n'th expression in an INSERT or UPDATE query.
|
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.
|
SqlNode |
SqlValidatorImpl.OrderExpressionExpander.go() |
SqlNode |
SqlValidatorImpl.NavigationModifier.go(SqlNode node) |
private SqlNode |
SqlValidatorImpl.navigationInDefine(SqlNode node,
String alpha)
Checks that all pattern variables within a function are the same,
and canonizes expressions such as
PREV(B.price) to
LAST(B.price, 0). |
private SqlNode |
SqlValidatorImpl.navigationInMeasure(SqlNode node,
boolean allRows) |
private SqlNode |
SqlValidatorImpl.OrderExpressionExpander.nthSelectItem(int ordinal,
SqlParserPos pos)
Returns the
ordinalth item in the select list. |
protected SqlNode |
SqlValidatorImpl.performUnconditionalRewrites(SqlNode node,
boolean underFrom)
Performs expression rewrites which are always used unconditionally.
|
private SqlNode |
SqlValidatorImpl.registerFrom(SqlValidatorScope parentScope,
SqlValidatorScope usingScope,
SqlNode node,
SqlNode enclosingNode,
String alias,
SqlNodeList extendList,
boolean forceNullable)
Registers scopes and namespaces implied a relational expression in the
FROM clause.
|
private SqlNode |
SqlValidatorImpl.rewriteUpdateToMerge(SqlUpdate updateCall,
SqlNode selfJoinSrcExpr) |
private SqlNode |
SqlValidatorImpl.stripDot(SqlNode node) |
private static SqlNode |
SqlValidatorImpl.stripOver(SqlNode node) |
SqlNode |
SqlValidator.validate(SqlNode topNode)
Validates an expression tree.
|
SqlNode |
SqlValidatorImpl.validate(SqlNode topNode) |
SqlNode |
SqlValidator.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap)
Validates an expression tree.
|
SqlNode |
SqlValidatorImpl.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap) |
private SqlNode |
SqlValidatorImpl.validateScopedExpression(SqlNode topNode,
SqlValidatorScope scope) |
SqlNode |
SqlScopedShuttle.visit(SqlCall call) |
SqlNode |
SqlValidatorImpl.NavigationExpander.visit(SqlCall call) |
SqlNode |
SqlValidatorImpl.NavigationReplacer.visit(SqlCall call) |
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlDataTypeSpec type)
Deprecated.
|
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlDynamicParam param)
Deprecated.
|
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlIdentifier id)
Deprecated.
|
SqlNode |
SqlValidatorImpl.Expander.visit(SqlIdentifier id) |
SqlNode |
SqlValidatorImpl.OrderExpressionExpander.visit(SqlIdentifier id) |
SqlNode |
SqlValidatorImpl.ExtendedExpander.visit(SqlIdentifier id) |
SqlNode |
SqlValidatorImpl.NavigationExpander.visit(SqlIdentifier id) |
SqlNode |
SqlValidatorImpl.NavigationReplacer.visit(SqlIdentifier id) |
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlIntervalQualifier intervalQualifier)
Deprecated.
|
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlLiteral literal)
Deprecated.
|
SqlNode |
SqlValidatorImpl.OrderExpressionExpander.visit(SqlLiteral literal) |
SqlNode |
SqlValidatorImpl.ExtendedExpander.visit(SqlLiteral literal) |
SqlNode |
SqlValidatorUtil.DeepCopier.visit(SqlNodeList list)
Deprecated.
|
protected SqlNode |
SqlValidatorUtil.DeepCopier.visitScoped(SqlCall call)
Deprecated.
|
protected SqlNode |
SqlScopedShuttle.visitScoped(SqlCall call)
Visits an operator call.
|
protected SqlNode |
SqlValidatorImpl.Expander.visitScoped(SqlCall call) |
protected SqlNode |
SqlValidatorImpl.OrderExpressionExpander.visitScoped(SqlCall call) |
| Modifier and Type | Method and Description |
|---|---|
List<SqlNode> |
SelectScope.getExpandedSelectList() |
private Pair<com.google.common.collect.ImmutableList<SqlNode>,com.google.common.collect.ImmutableList<SqlNode>> |
AggregatingSelectScope.getGroupExprs()
Returns the expressions that are in the GROUP BY clause (or the SELECT
DISTINCT clause, if distinct) and that can therefore be referenced
without being wrapped in aggregate functions.
|
private Pair<com.google.common.collect.ImmutableList<SqlNode>,com.google.common.collect.ImmutableList<SqlNode>> |
AggregatingSelectScope.getGroupExprs()
Returns the expressions that are in the GROUP BY clause (or the SELECT
DISTINCT clause, if distinct) and that can therefore be referenced
without being wrapped in aggregate functions.
|
List<Pair<SqlNode,SqlMonotonicity>> |
AbstractNamespace.getMonotonicExprs() |
List<Pair<SqlNode,SqlMonotonicity>> |
DelegatingNamespace.getMonotonicExprs() |
List<Pair<SqlNode,SqlMonotonicity>> |
SqlValidatorNamespace.getMonotonicExprs()
Returns a list of expressions which are monotonic in this namespace.
|
List<Pair<SqlNode,SqlMonotonicity>> |
IdentifierNamespace.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.
|
private static String |
SqlValidatorImpl.alias(SqlNode item)
Returns the alias of a "expr AS alias" expression.
|
private static ImmutableBitSet |
SqlValidatorUtil.analyzeGroupExpr(SqlValidatorScope scope,
SqlValidatorUtil.GroupAnalyzer groupAnalyzer,
SqlNode groupExpr)
Analyzes a component of a tuple in a GROUPING SETS clause.
|
static void |
SqlValidatorUtil.analyzeGroupItem(SqlValidatorScope scope,
SqlValidatorUtil.GroupAnalyzer groupAnalyzer,
com.google.common.collect.ImmutableList.Builder<com.google.common.collect.ImmutableList<ImmutableBitSet>> topBuilder,
SqlNode groupExpr)
Analyzes an expression in a GROUP BY clause.
|
CalciteContextException |
SqlValidatorImpl.ValidationErrorFunction.apply(SqlNode v0,
Resources.ExInst<SqlValidatorException> v1) |
boolean |
AggregatingSelectScope.checkAggregateExpr(SqlNode expr,
boolean deep) |
boolean |
AggregatingScope.checkAggregateExpr(SqlNode expr,
boolean deep)
Checks whether an expression is constant within the GROUP BY clause.
|
private void |
SqlValidatorImpl.checkConstraint(SqlValidatorTable validatorTable,
SqlNode source,
RelDataType targetRowType)
Validates insert values against the constraint of a modifiable view.
|
private void |
SqlValidatorImpl.checkFieldCount(SqlNode node,
SqlValidatorTable table,
SqlNode source,
RelDataType logicalSourceRowType,
RelDataType logicalTargetRowType) |
private void |
SqlValidatorImpl.checkRollUp(SqlNode grandParent,
SqlNode parent,
SqlNode current,
SqlValidatorScope scope) |
private void |
SqlValidatorImpl.checkRollUp(SqlNode grandParent,
SqlNode parent,
SqlNode current,
SqlValidatorScope scope,
String optionalClause) |
private void |
SqlValidatorImpl.checkRollUpInUsing(SqlIdentifier identifier,
SqlNode leftOrRight) |
protected void |
SqlValidatorImpl.checkTypeAssignment(RelDataType sourceRowType,
RelDataType targetRowType,
SqlNode query) |
private static void |
SqlValidatorUtil.convertGroupSet(SqlValidatorScope scope,
SqlValidatorUtil.GroupAnalyzer groupAnalyzer,
com.google.common.collect.ImmutableList.Builder<ImmutableBitSet> builder,
SqlNode groupExpr)
Analyzes a GROUPING SETS item in a GROUP BY clause.
|
protected MatchRecognizeNamespace |
SqlValidatorImpl.createMatchRecognizeNameSpace(SqlMatchRecognize call,
SqlNode enclosingNode) |
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). |
private SqlModality |
SqlValidatorImpl.deduceModality(SqlNode query)
Return the intended modality of a SELECT or set-op.
|
String |
SqlValidator.deriveAlias(SqlNode node,
int ordinal)
Derives an alias for an expression.
|
String |
SqlValidatorImpl.deriveAlias(SqlNode node,
int ordinal) |
RelDataType |
SqlValidator.deriveType(SqlValidatorScope scope,
SqlNode operand)
Derives the type of a node in a given scope.
|
RelDataType |
SqlValidatorImpl.deriveType(SqlValidatorScope scope,
SqlNode expr) |
(package private) RelDataType |
SqlValidatorImpl.deriveTypeImpl(SqlValidatorScope scope,
SqlNode operand)
Derives the type of a node, never null.
|
SqlNode |
SqlValidator.expand(SqlNode expr,
SqlValidatorScope scope)
Expands an expression.
|
SqlNode |
SqlValidatorImpl.expand(SqlNode expr,
SqlValidatorScope scope) |
SqlNode |
SqlValidatorImpl.expandGroupByOrHavingExpr(SqlNode expr,
SqlValidatorScope scope,
SqlSelect select,
boolean havingExpression) |
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.
|
SqlNode |
SqlValidatorImpl.expandOrderExpr(SqlSelect select,
SqlNode orderExpr) |
private boolean |
SqlValidatorImpl.expandSelectItem(SqlNode selectItem,
SqlSelect select,
RelDataType targetType,
List<SqlNode> selectItems,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> types,
boolean includeSystemVars)
If
selectItem is "*" or "TABLE.*", expands it and returns
true; otherwise writes the unexpanded item. |
private boolean |
SqlValidatorImpl.expandStar(List<SqlNode> selectItems,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> types,
boolean includeSystemVars,
SelectScope scope,
SqlNode node) |
SqlCall |
AggFinder.findAgg(SqlNode node)
Finds an aggregate.
|
Pair<String,SqlValidatorNamespace> |
ListScope.findQualifyingTableName(String columnName,
SqlNode ctx) |
Pair<String,SqlValidatorNamespace> |
SqlValidatorScope.findQualifyingTableName(String columnName,
SqlNode ctx)
|
Pair<String,SqlValidatorNamespace> |
EmptyScope.findQualifyingTableName(String columnName,
SqlNode ctx) |
Pair<String,SqlValidatorNamespace> |
DelegatingScope.findQualifyingTableName(String columnName,
SqlNode ctx) |
Map<String,ScopeChild> |
ListScope.findQualifyingTableNames(String columnName,
SqlNode ctx,
SqlNameMatcher nameMatcher) |
Map<String,ScopeChild> |
SqlValidatorScope.findQualifyingTableNames(String columnName,
SqlNode ctx,
SqlNameMatcher nameMatcher)
Finds all table aliases which are implicitly qualifying an unqualified
column name.
|
Map<String,ScopeChild> |
MatchRecognizeScope.findQualifyingTableNames(String columnName,
SqlNode ctx,
SqlNameMatcher nameMatcher) |
Map<String,ScopeChild> |
EmptyScope.findQualifyingTableNames(String columnName,
SqlNode ctx,
SqlNameMatcher nameMatcher) |
Map<String,ScopeChild> |
DelegatingScope.findQualifyingTableNames(String columnName,
SqlNode ctx,
SqlNameMatcher nameMatcher) |
static String |
SqlValidatorUtil.getAlias(SqlNode node,
int ordinal)
Derives an alias for a node, and invents a mangled identifier if it
cannot.
|
private List<String> |
SqlValidatorImpl.getFieldOrigin(SqlNode sqlQuery,
int i) |
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.
|
List<List<String>> |
SqlValidatorImpl.getFieldOrigins(SqlNode sqlQuery) |
private SqlSelect |
SqlValidatorImpl.getInnerSelect(SqlNode node) |
SqlValidatorScope |
SqlValidator.getJoinScope(SqlNode node)
Returns a scope containing the objects visible from the ON and USING
sections of a JOIN clause.
|
SqlValidatorScope |
SqlValidatorImpl.getJoinScope(SqlNode node) |
SqlMonotonicity |
SelectScope.getMonotonicity(SqlNode expr) |
SqlMonotonicity |
SqlValidatorScope.getMonotonicity(SqlNode expr)
Returns whether an expression is monotonic in this scope.
|
SqlMonotonicity |
EmptyScope.getMonotonicity(SqlNode expr) |
SqlMonotonicity |
DelegatingScope.getMonotonicity(SqlNode expr) |
SqlMonotonicity |
OverScope.getMonotonicity(SqlNode expr) |
SqlValidatorNamespace |
SqlValidator.getNamespace(SqlNode node)
Finds the namespace corresponding to a given node.
|
SqlValidatorNamespace |
SqlValidatorImpl.getNamespace(SqlNode node) |
private SqlValidatorNamespace |
SqlValidatorImpl.getNamespace(SqlNode node,
SqlValidatorScope scope) |
private SqlNode |
SqlValidatorImpl.getNthExpr(SqlNode query,
int ordinal,
int sourceCount)
Locates the n'th expression in an INSERT or UPDATE query.
|
SqlNode |
SqlValidatorImpl.getOriginal(SqlNode expr) |
SqlValidatorScope |
SqlValidator.getOverScope(SqlNode node)
Returns the scope of an OVER or VALUES node.
|
SqlValidatorScope |
SqlValidatorImpl.getOverScope(SqlNode node) |
RelDataType |
SqlValidator.getParameterRowType(SqlNode sqlQuery)
Returns a record type that contains the name and type of each parameter.
|
RelDataType |
SqlValidatorImpl.getParameterRowType(SqlNode sqlQuery) |
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 |
SqlValidator.getValidatedNodeType(SqlNode node)
Returns the type assigned to a node by validation.
|
RelDataType |
SqlValidatorImpl.getValidatedNodeType(SqlNode node) |
RelDataType |
SqlValidator.getValidatedNodeTypeIfKnown(SqlNode node)
Returns the type assigned to a node by validation, or null if unknown.
|
RelDataType |
SqlValidatorImpl.getValidatedNodeTypeIfKnown(SqlNode node) |
private static Object |
SqlUserDefinedTableMacro.getValue(SqlNode right) |
private SqlWindow |
SqlValidatorImpl.getWindowInOver(SqlNode over) |
SqlValidatorScope |
SqlValidator.getWithScope(SqlNode withItem) |
SqlValidatorScope |
SqlValidatorImpl.getWithScope(SqlNode withItem) |
SqlNode |
SqlValidatorImpl.NavigationModifier.go(SqlNode node) |
private void |
SqlValidatorImpl.handleOffsetFetch(SqlNode offset,
SqlNode fetch) |
protected void |
SqlValidatorImpl.inferUnknownTypes(RelDataType inferredType,
SqlValidatorScope scope,
SqlNode node) |
boolean |
SqlValidator.isAggregate(SqlNode selectNode)
Deprecated.
|
boolean |
SqlValidatorImpl.isAggregate(SqlNode selectNode) |
(package private) boolean |
AggChecker.isGroupExpr(SqlNode expr) |
boolean |
AggregatingSelectScope.Resolved.isGroupingExpr(SqlNode operand)
Returns whether a given expression is equal to one of the grouping
expressions.
|
private static boolean |
SqlValidatorImpl.isLateral(SqlNode node) |
protected boolean |
SqlValidatorImpl.isNestedAggregateWindow(SqlNode node) |
protected boolean |
SqlValidatorImpl.isOverAggregateWindow(SqlNode node) |
private boolean |
SqlValidatorImpl.isRolledUpColumnAllowedInAgg(SqlIdentifier identifier,
SqlValidatorScope scope,
SqlCall aggCall,
SqlNode parent) |
private boolean |
SqlValidatorImpl.isRowWithDefault(SqlNode operand,
int column) |
private boolean |
SqlValidatorImpl.isSortCompatible(SelectScope scope,
SqlNode node,
boolean descending) |
private boolean |
SqlValidatorImpl.isValuesWithDefault(SqlNode source,
int column)
Returns whether a query uses
DEFAULT to populate a given
column. |
private void |
SqlValidatorImpl.lookupFromHints(SqlNode node,
SqlValidatorScope scope,
SqlParserPos pos,
Collection<SqlMoniker> hintList) |
private static int |
SqlValidatorUtil.lookupGroupExpr(SqlValidatorUtil.GroupAnalyzer groupAnalyzer,
SqlNode expr) |
int |
AggregatingSelectScope.Resolved.lookupGroupingExpr(SqlNode operand) |
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.
|
List<SqlMoniker> |
SqlValidatorImpl.lookupHints(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. |
SqlMoniker |
SqlValidatorImpl.lookupQualifiedName(SqlNode topNode,
SqlParserPos pos) |
private SqlNode |
SqlValidatorImpl.navigationInDefine(SqlNode node,
String alpha)
Checks that all pattern variables within a function are the same,
and canonizes expressions such as
PREV(B.price) to
LAST(B.price, 0). |
private SqlNode |
SqlValidatorImpl.navigationInMeasure(SqlNode node,
boolean allRows) |
CalciteContextException |
SqlValidator.newValidationError(SqlNode node,
Resources.ExInst<SqlValidatorException> e)
Adds "line x, column y" context to a validator exception.
|
CalciteContextException |
SqlValidatorImpl.newValidationError(SqlNode node,
Resources.ExInst<SqlValidatorException> e) |
RelDataType |
SqlValidatorScope.nullifyType(SqlNode node,
RelDataType type)
Converts the type of an expression to nullable, if the context
warrants it.
|
RelDataType |
AggregatingSelectScope.nullifyType(SqlNode node,
RelDataType type) |
RelDataType |
EmptyScope.nullifyType(SqlNode node,
RelDataType type) |
RelDataType |
DelegatingScope.nullifyType(SqlNode node,
RelDataType type) |
protected SqlNode |
SqlValidatorImpl.performUnconditionalRewrites(SqlNode node,
boolean underFrom)
Performs expression rewrites which are always used unconditionally.
|
private SqlNode |
SqlValidatorImpl.registerFrom(SqlValidatorScope parentScope,
SqlValidatorScope usingScope,
SqlNode node,
SqlNode enclosingNode,
String alias,
SqlNodeList extendList,
boolean forceNullable)
Registers scopes and namespaces implied a relational expression in the
FROM clause.
|
private void |
SqlValidatorImpl.registerMatchRecognize(SqlValidatorScope parentScope,
SqlValidatorScope usingScope,
SqlMatchRecognize call,
SqlNode enclosingNode,
String alias,
boolean forceNullable) |
private void |
SqlValidatorImpl.registerQuery(SqlValidatorScope parentScope,
SqlValidatorScope usingScope,
SqlNode node,
SqlNode enclosingNode,
String alias,
boolean forceNullable)
Registers a query in a parent scope.
|
private void |
SqlValidatorImpl.registerQuery(SqlValidatorScope parentScope,
SqlValidatorScope usingScope,
SqlNode node,
SqlNode enclosingNode,
String alias,
boolean forceNullable,
boolean checkUpdate)
Registers a query in a parent scope.
|
private void |
SqlValidatorImpl.registerSetop(SqlValidatorScope parentScope,
SqlValidatorScope usingScope,
SqlNode node,
SqlNode enclosingNode,
String alias,
boolean forceNullable) |
private void |
SqlValidatorImpl.registerSubQueries(SqlValidatorScope parentScope,
SqlNode node) |
private void |
SqlValidatorImpl.registerWith(SqlValidatorScope parentScope,
SqlValidatorScope usingScope,
SqlWith with,
SqlNode enclosingNode,
String alias,
boolean forceNullable,
boolean checkUpdate) |
void |
SqlValidator.removeValidatedNodeType(SqlNode node)
Removes a node from the set of validated nodes
|
void |
SqlValidatorImpl.removeValidatedNodeType(SqlNode node) |
RelDataType |
ListScope.resolveColumn(String columnName,
SqlNode ctx) |
RelDataType |
OrderByScope.resolveColumn(String name,
SqlNode ctx) |
RelDataType |
SqlValidatorScope.resolveColumn(String name,
SqlNode ctx)
Resolves a single identifier to a column, and returns the datatype of
that column.
|
RelDataType |
EmptyScope.resolveColumn(String name,
SqlNode ctx) |
RelDataType |
DelegatingScope.resolveColumn(String name,
SqlNode ctx) |
SqlWindow |
SqlValidator.resolveWindow(SqlNode windowOrRef,
SqlValidatorScope scope,
boolean populateBounds)
Converts a window specification or window name into a fully-resolved
window specification.
|
SqlWindow |
SqlValidatorImpl.resolveWindow(SqlNode windowOrRef,
SqlValidatorScope scope,
boolean populateBounds) |
private SqlNode |
SqlValidatorImpl.rewriteUpdateToMerge(SqlUpdate updateCall,
SqlNode selfJoinSrcExpr) |
void |
SqlValidatorImpl.setOriginal(SqlNode expr,
SqlNode original) |
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. |
void |
SqlValidatorImpl.setValidatedNodeType(SqlNode node,
RelDataType type)
Saves the type of a
SqlNode, now that it has been validated. |
private boolean |
SqlValidatorImpl.shouldCheckForRollUp(SqlNode from) |
protected static Pair<SqlIdentifier,SqlNodeList> |
IdentifierNamespace.split(SqlNode node) |
private SqlNode |
SqlValidatorImpl.stripDot(SqlNode node) |
private static SqlNode |
SqlValidatorImpl.stripOver(SqlNode node) |
protected RelDataType |
AbstractNamespace.toStruct(RelDataType type,
SqlNode unnest)
Converts a type to a struct if it is not already.
|
SqlNode |
SqlValidator.validate(SqlNode topNode)
Validates an expression tree.
|
SqlNode |
SqlValidatorImpl.validate(SqlNode topNode) |
private void |
SqlValidatorImpl.validateAccess(SqlNode node,
SqlValidatorTable table,
SqlAccessEnum requiredAccess)
Validates access to a table.
|
void |
SqlValidator.validateAggregateParams(SqlCall aggCall,
SqlNode filter,
SqlValidatorScope scope)
Validates parameters for aggregate function.
|
void |
SqlValidatorImpl.validateAggregateParams(SqlCall aggCall,
SqlNode filter,
SqlValidatorScope scope) |
void |
OrderByScope.validateExpr(SqlNode expr) |
void |
SqlValidatorScope.validateExpr(SqlNode expr)
Performs any scope-specific validation of an expression.
|
void |
AggregatingSelectScope.validateExpr(SqlNode expr) |
void |
EmptyScope.validateExpr(SqlNode expr) |
void |
DelegatingScope.validateExpr(SqlNode expr) |
void |
GroupByScope.validateExpr(SqlNode expr) |
private void |
SqlValidatorImpl.validateExpr(SqlNode expr,
SqlValidatorScope scope)
Validates an expression.
|
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 sub-query.
|
private void |
SqlValidatorImpl.validateGroupByItem(SqlSelect select,
SqlNode groupByItem)
Validates an item in the GROUP BY clause of a SELECT statement.
|
private void |
SqlValidatorImpl.validateGroupItem(SqlValidatorScope groupScope,
AggregatingSelectScope aggregatingScope,
SqlNode groupItem) |
private void |
SqlValidatorImpl.validateModality(SqlNode query)
Validates that a query can deliver the modality it promises.
|
private void |
SqlValidatorImpl.validateNoAggs(AggFinder aggFinder,
SqlNode node,
String clause)
Throws an error if there is an aggregate or windowed aggregate in the
given clause.
|
private void |
SqlValidatorImpl.validateNodeFeature(SqlNode node) |
private void |
SqlValidatorImpl.validateOrderItem(SqlSelect select,
SqlNode orderItem)
Validates an item in the ORDER BY clause of a SELECT statement.
|
SqlNode |
SqlValidator.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap)
Validates an expression tree.
|
SqlNode |
SqlValidatorImpl.validateParameterizedExpression(SqlNode topNode,
Map<String,RelDataType> nameToTypeMap) |
void |
SqlValidator.validateQuery(SqlNode node,
SqlValidatorScope scope,
RelDataType targetRowType)
Checks that a query is valid.
|
void |
SqlValidatorImpl.validateQuery(SqlNode node,
SqlValidatorScope scope,
RelDataType targetRowType) |
private SqlNode |
SqlValidatorImpl.validateScopedExpression(SqlNode topNode,
SqlValidatorScope scope) |
private RelDataType |
SqlValidatorImpl.validateUsingCol(SqlIdentifier id,
SqlNode leftOrRight) |
protected void |
SqlValidatorImpl.validateWhereOrOn(SqlValidatorScope scope,
SqlNode condition,
String clause) |
void |
SqlValidator.validateWindow(SqlNode windowOrId,
SqlValidatorScope scope,
SqlCall call)
Validates the right-hand side of an OVER expression.
|
void |
SqlValidatorImpl.validateWindow(SqlNode windowOrId,
SqlValidatorScope scope,
SqlCall call) |
| Modifier and Type | Method and Description |
|---|---|
private boolean |
SqlValidatorImpl.addOrExpandField(List<SqlNode> selectItems,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> types,
boolean includeSystemVars,
SelectScope scope,
SqlIdentifier id,
RelDataTypeField field) |
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.
|
private static List<ImmutableBitSet> |
SqlValidatorUtil.analyzeGroupTuple(SqlValidatorScope scope,
SqlValidatorUtil.GroupAnalyzer groupAnalyzer,
List<SqlNode> operandList)
Analyzes a tuple in a GROUPING SETS clause.
|
(package private) static void |
SqlValidatorUtil.checkIdentifierListForDuplicates(List<SqlNode> columnList,
SqlValidatorImpl.ValidationErrorFunction validationErrorFunction)
Checks that there are no duplicates in a list of
SqlIdentifier. |
static List<Object> |
SqlUserDefinedTableMacro.convertArguments(RelDataTypeFactory typeFactory,
List<SqlNode> operandList,
Function function,
SqlIdentifier opName,
boolean failOnNonLiteral)
Converts arguments from
SqlNode to
java object format. |
private boolean |
SqlValidatorImpl.expandSelectItem(SqlNode selectItem,
SqlSelect select,
RelDataType targetType,
List<SqlNode> selectItems,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> types,
boolean includeSystemVars)
If
selectItem is "*" or "TABLE.*", expands it and returns
true; otherwise writes the unexpanded item. |
private boolean |
SqlValidatorImpl.expandStar(List<SqlNode> selectItems,
Set<String> aliases,
List<Map.Entry<String,RelDataType>> types,
boolean includeSystemVars,
SelectScope scope,
SqlNode node) |
SqlCall |
AggFinder.findAgg(List<SqlNode> nodes) |
(package private) Iterable<SqlCall> |
AggFinder.findAll(Iterable<SqlNode> nodes)
Creates a copy of this finder that has the same parameters as this,
then returns the list of all aggregates found.
|
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.
|
private void |
SqlValidatorImpl.handleScalarSubQuery(SqlSelect parentSelect,
SqlSelect selectItem,
List<SqlNode> expandedSelectItems,
Set<String> aliasList,
List<Map.Entry<String,RelDataType>> fieldList)
Processes SubQuery found in Select list.
|
void |
SelectScope.setExpandedSelectList(List<SqlNode> selectList) |
void |
SqlValidator.validateColumnListParams(SqlFunction function,
List<RelDataType> argTypes,
List<SqlNode> operands)
Validates a COLUMN_LIST parameter
|
void |
SqlValidatorImpl.validateColumnListParams(SqlFunction function,
List<RelDataType> argTypes,
List<SqlNode> operands) |
| Constructor and Description |
|---|
AbstractNamespace(SqlValidatorImpl validator,
SqlNode enclosingNode)
Creates an AbstractNamespace.
|
AliasNamespace(SqlValidatorImpl validator,
SqlCall call,
SqlNode enclosingNode)
Creates an AliasNamespace.
|
CollectNamespace(SqlCall child,
SqlValidatorScope scope,
SqlNode enclosingNode)
Creates a CollectNamespace.
|
DeleteNamespace(SqlValidatorImpl validator,
SqlDelete node,
SqlNode enclosingNode,
SqlValidatorScope parentScope) |
DmlNamespace(SqlValidatorImpl validator,
SqlNode id,
SqlNode enclosingNode,
SqlValidatorScope parentScope) |
ExtendedExpander(SqlValidatorImpl validator,
SqlValidatorScope scope,
SqlSelect select,
SqlNode root,
boolean havingExpr) |
IdentifierNamespace(SqlValidatorImpl validator,
SqlIdentifier id,
SqlNodeList extendList,
SqlNode enclosingNode,
SqlValidatorScope parentScope)
Creates an IdentifierNamespace.
|
IdentifierNamespace(SqlValidatorImpl validator,
SqlNode node,
SqlNode enclosingNode,
SqlValidatorScope parentScope) |
InsertNamespace(SqlValidatorImpl validator,
SqlInsert node,
SqlNode enclosingNode,
SqlValidatorScope parentScope) |
MatchRecognizeNamespace(SqlValidatorImpl validator,
SqlMatchRecognize matchRecognize,
SqlNode enclosingNode)
Creates a MatchRecognizeNamespace.
|
MergeNamespace(SqlValidatorImpl validator,
SqlMerge node,
SqlNode enclosingNode,
SqlValidatorScope parentScope) |
NavigationExpander(SqlOperator operator,
SqlNode offset) |
OrderExpressionExpander(SqlSelect select,
SqlNode root) |
ProcedureNamespace(SqlValidatorImpl validator,
SqlValidatorScope scope,
SqlCall call,
SqlNode enclosingNode) |
SelectNamespace(SqlValidatorImpl validator,
SqlSelect select,
SqlNode enclosingNode)
Creates a SelectNamespace.
|
SetopNamespace(SqlValidatorImpl validator,
SqlCall call,
SqlNode enclosingNode)
Creates a
SetopNamespace. |
TableConstructorNamespace(SqlValidatorImpl validator,
SqlCall values,
SqlValidatorScope scope,
SqlNode enclosingNode)
Creates a TableConstructorNamespace.
|
TableScope(SqlValidatorScope parent,
SqlNode node)
Creates a scope corresponding to a LATERAL TABLE clause.
|
UnnestNamespace(SqlValidatorImpl validator,
SqlCall unnest,
SqlValidatorScope scope,
SqlNode enclosingNode) |
UpdateNamespace(SqlValidatorImpl validator,
SqlUpdate node,
SqlNode enclosingNode,
SqlValidatorScope parentScope) |
ValidationError(SqlNode sqlNode,
Resources.ExInst<SqlValidatorException> validatorException) |
WithItemNamespace(SqlValidatorImpl validator,
SqlWithItem withItem,
SqlNode enclosingNode) |
WithNamespace(SqlValidatorImpl validator,
SqlWith with,
SqlNode enclosingNode)
Creates a TableConstructorNamespace.
|
| Constructor and Description |
|---|
AggChecker(SqlValidatorImpl validator,
AggregatingScope scope,
List<SqlNode> extraExprs,
List<SqlNode> groupExprs,
boolean distinct)
Creates an AggChecker.
|
AggChecker(SqlValidatorImpl validator,
AggregatingScope scope,
List<SqlNode> extraExprs,
List<SqlNode> groupExprs,
boolean distinct)
Creates an AggChecker.
|
GroupAnalyzer(List<SqlNode> groupExprs) |
Resolved(List<SqlNode> extraExprList,
List<SqlNode> groupExprList,
Iterable<ImmutableBitSet> groupSets,
Map<Integer,Integer> groupExprProjection) |
Resolved(List<SqlNode> extraExprList,
List<SqlNode> groupExprList,
Iterable<ImmutableBitSet> groupSets,
Map<Integer,Integer> groupExprProjection) |
| Modifier and Type | Field and Description |
|---|---|
(package private) SqlNode |
SqlToRelConverter.SubQuery.node |
| Modifier and Type | Field and Description |
|---|---|
private Map<SqlNode,RexNode> |
SqlToRelConverter.AggConverter.aggMapping |
private Map<SqlNode,Ord<AuxiliaryConverter>> |
SqlToRelConverter.AggConverter.auxiliaryGroupExprs
The auxiliary group-by expressions.
|
private Map<SqlNode,RexNode> |
SqlToRelConverter.mapConvertedNonCorrSubqs
Mapping of non-correlated sub-queries that have been converted to their
equivalent constants.
|
| Modifier and Type | Method and Description |
|---|---|
private SqlNode |
StandardConvertletTable.AvgVarianceConvertlet.expandAvg(SqlNode arg,
RelDataType avgType,
SqlRexContext cx) |
private SqlNode |
StandardConvertletTable.AvgVarianceConvertlet.expandVariance(SqlNode argInput,
RelDataType varType,
SqlRexContext cx,
boolean biased,
boolean sqrt) |
private static SqlNode |
SqlToRelConverter.pushDownNotForIn(SqlValidatorScope scope,
SqlNode sqlNode)
Push down all the NOT logical operators into any IN/NOT IN operators.
|
private static SqlNode |
SqlToRelConverter.reg(SqlValidatorScope scope,
SqlNode e)
Registers with the validator a
SqlNode that has been created
during the Sql-to-Rel process. |
| Modifier and Type | Method and Description |
|---|---|
Map<SqlNode,RexNode> |
SqlToRelConverter.getMapConvertedNonCorrSubqs() |
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
SqlToRelConverter.AggConverter.addAuxiliaryGroupExpr(SqlNode node,
int index,
AuxiliaryConverter converter) |
int |
SqlToRelConverter.AggConverter.addGroupExpr(SqlNode expr) |
static RexNode |
StandardConvertletTable.castToValidatedType(SqlNode node,
RexNode e,
SqlValidator validator,
RexBuilder rexBuilder)
Casts a RexNode value to the validated type of a SqlCall.
|
private void |
SqlToRelConverter.checkConvertedType(SqlNode query,
RelNode result) |
private static boolean |
SqlToRelConverter.containsInOperator(SqlNode node)
Returns whether a given node contains a
SqlInOperator. |
private RelOptUtil.Exists |
SqlToRelConverter.convertExists(SqlNode seek,
RelOptUtil.SubQueryType subQueryType,
RelOptUtil.Logic logic,
boolean notIn,
RelDataType targetDataType)
Converts an EXISTS or IN predicate into a join.
|
RexNode |
InitializerContext.convertExpression(SqlNode e) |
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.
|
private RexNode |
SqlToRelConverter.convertJoinCondition(SqlToRelConverter.Blackboard bb,
SqlValidatorNamespace leftNamespace,
SqlValidatorNamespace rightNamespace,
SqlNode condition,
JoinConditionType conditionType,
RelNode leftRel,
RelNode rightRel) |
private RexLiteral |
SqlToRelConverter.convertLiteralInValuesList(SqlNode sqlNode,
SqlToRelConverter.Blackboard bb,
RelDataType rowType,
int iField) |
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) |
private RexNode |
SqlToRelConverter.convertOver(SqlToRelConverter.Blackboard bb,
SqlNode node) |
private Pair<RexNode,RexNode> |
StandardConvertletTable.convertOverlapsOperand(SqlRexContext cx,
SqlParserPos pos,
SqlNode operand) |
RelRoot |
SqlToRelConverter.convertQuery(SqlNode query,
boolean needsValidation,
boolean top)
Converts an unvalidated query's parse tree into a relational expression.
|
private RelNode |
SqlToRelConverter.convertQueryOrInList(SqlToRelConverter.Blackboard bb,
SqlNode seek,
RelDataType targetRowType) |
protected RelRoot |
SqlToRelConverter.convertQueryRecursive(SqlNode query,
boolean top,
RelDataType targetRowType)
Recursively converts a query to a relational expression.
|
private RelNode |
SqlToRelConverter.convertRowValues(SqlToRelConverter.Blackboard bb,
SqlNode rowList,
Collection<SqlNode> rows,
boolean allowLiteralsOnly,
RelDataType targetRowType) |
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.
|
private void |
SqlToRelConverter.convertWhere(SqlToRelConverter.Blackboard bb,
SqlNode where)
Converts a WHERE clause.
|
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 sub-query is correlated and decorrelation is enabled, performs
decorrelation.
|
private String |
SqlToRelConverter.deriveAlias(SqlNode node,
Collection<String> aliases,
int ordinal) |
private SqlNode |
StandardConvertletTable.AvgVarianceConvertlet.expandAvg(SqlNode arg,
RelDataType avgType,
SqlRexContext cx) |
private SqlNode |
StandardConvertletTable.AvgVarianceConvertlet.expandVariance(SqlNode argInput,
RelDataType varType,
SqlRexContext cx,
boolean biased,
boolean sqrt) |
private void |
SqlToRelConverter.findSubQueries(SqlToRelConverter.Blackboard bb,
SqlNode node,
RelOptUtil.Logic logic,
boolean registerOnlyScalarSubQueries)
Builds a list of all
IN or EXISTS operators
inside SQL parse tree. |
(package private) SqlToRelConverter.SubQuery |
SqlToRelConverter.Blackboard.getSubQuery(SqlNode expr) |
protected RelOptTable |
SqlToRelConverter.getTargetTable(SqlNode call) |
static boolean |
SqlToRelConverter.isOrdered(SqlNode query) |
private boolean |
SqlToRelConverter.isRowConstructor(SqlNode node) |
private static boolean |
SqlToRelConverter.isStream(SqlNode query) |
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.
|
private SqlCall |
StandardConvertletTable.plus(SqlParserPos pos,
SqlNode a0,
SqlNode a1) |
private static SqlNode |
SqlToRelConverter.pushDownNotForIn(SqlValidatorScope scope,
SqlNode sqlNode)
Push down all the NOT logical operators into any IN/NOT IN operators.
|
private static SqlNode |
SqlToRelConverter.reg(SqlValidatorScope scope,
SqlNode e)
Registers with the validator a
SqlNode that has been created
during the Sql-to-Rel process. |
(package private) void |
SqlToRelConverter.Blackboard.registerSubQuery(SqlNode node,
RelOptUtil.Logic logic) |
private void |
SqlToRelConverter.replaceSubQueries(SqlToRelConverter.Blackboard bb,
SqlNode expr,
RelOptUtil.Logic logic) |
private void |
SqlToRelConverter.AggConverter.translateAgg(SqlCall call,
SqlNode filter,
SqlCall outerCall) |
| Modifier and Type | Method and Description |
|---|---|
void |
SqlToRelConverter.addConvertedNonCorrSubqs(Map<SqlNode,RexNode> alreadyConvertedNonCorrSubqs)
Adds to the current map of non-correlated converted sub-queries the
elements from another map that contains non-correlated sub-queries 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.
|
private static List<RexNode> |
StandardConvertletTable.convertExpressionList(SqlRexContext cx,
List<SqlNode> nodes,
SqlOperandTypeChecker.Consistency consistency) |
private RelNode |
SqlToRelConverter.convertMultisets(List<SqlNode> operands,
SqlToRelConverter.Blackboard bb) |
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) |
private RelNode |
SqlToRelConverter.convertRowValues(SqlToRelConverter.Blackboard bb,
SqlNode rowList,
Collection<SqlNode> rows,
boolean allowLiteralsOnly,
RelDataType targetRowType) |
private void |
SqlToRelConverter.convertSelectList(SqlToRelConverter.Blackboard bb,
SqlSelect select,
List<SqlNode> orderList) |
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.
|
| Constructor and Description |
|---|
SubQuery(SqlNode node,
RelOptUtil.Logic logic) |
| 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 |
|---|---|
Pair<SqlNode,RelDataType> |
Planner.validateAndGetType(SqlNode sqlNode)
Validates a SQL statement.
|
| Modifier and Type | Method and Description |
|---|---|
RelNode |
Planner.convert(SqlNode sql)
Deprecated.
|
RelRoot |
Planner.rel(SqlNode sql)
Converts a SQL parse tree into a tree of relational expressions.
|
SqlNode |
Planner.validate(SqlNode sqlNode)
Validates a SQL statement.
|
Pair<SqlNode,RelDataType> |
Planner.validateAndGetType(SqlNode sqlNode)
Validates a SQL statement.
|
Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.