Uses of Class
org.apache.calcite.sql.SqlNode
-
Packages that use SqlNode Package Description org.apache.calcite.adapter.druid Query provider based on a Druid database.org.apache.calcite.benchmarks JMH benchmarks for Calciteorg.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.ddl Parse tree for SQL DDL 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. -
-
Uses of SqlNode in org.apache.calcite.adapter.druid
Methods in org.apache.calcite.adapter.druid with parameters of type SqlNode Modifier and Type Method Description private boolean
DruidTable. isValidParentKind(SqlNode node)
boolean
DruidTable. rolledUpColumnValidInsideAgg(java.lang.String column, SqlCall call, SqlNode parent, CalciteConnectionConfig config)
-
Uses of SqlNode in org.apache.calcite.benchmarks
Methods in org.apache.calcite.benchmarks that return SqlNode Modifier and Type Method Description SqlNode
ParserBenchmark. parseCached()
SqlNode
ParserBenchmark. parseNonCached()
-
Uses of SqlNode in org.apache.calcite.jdbc
Fields in org.apache.calcite.jdbc declared as SqlNode Modifier and Type Field Description SqlNode
CalcitePrepare.ParseResult. sqlNode
Methods in org.apache.calcite.jdbc with parameters of type SqlNode Modifier and Type Method Description void
CalcitePrepare. executeDdl(CalcitePrepare.Context context, SqlNode node)
Executes a DDL statement.Constructors in org.apache.calcite.jdbc with parameters of type SqlNode Constructor Description AnalyzeViewResult(CalcitePrepareImpl prepare, SqlValidator validator, java.lang.String sql, SqlNode sqlNode, RelDataType rowType, RelRoot root, Table table, com.google.common.collect.ImmutableList<java.lang.String> tablePath, RexNode constraint, ImmutableIntList columnMapping, boolean modifiable)
ConvertResult(CalcitePrepareImpl prepare, SqlValidator validator, java.lang.String sql, SqlNode sqlNode, RelDataType rowType, RelRoot root)
ParseResult(CalcitePrepareImpl prepare, SqlValidator validator, java.lang.String sql, SqlNode sqlNode, RelDataType rowType)
-
Uses of SqlNode in org.apache.calcite.materialize
Methods in org.apache.calcite.materialize with parameters of type SqlNode Modifier and Type Method Description private static void
Lattice. populateAliases(SqlNode from, java.util.List<java.lang.String> aliases, java.lang.String current)
Method parameters in org.apache.calcite.materialize with type arguments of type SqlNode Modifier and Type Method Description Lattice.SqlWriter
Lattice. createSqlWriter(SqlDialect dialect, java.lang.StringBuilder buf, java.util.function.IntFunction<SqlNode> field)
Creates a context to which SQL can be generated. -
Uses of SqlNode in org.apache.calcite.plan
Methods in org.apache.calcite.plan with parameters of type SqlNode Modifier and Type Method Description static void
RelOptUtil. validateValueAgainstConstraint(SqlNode sourceValue, RexNode targetConstraint, java.util.function.Supplier<CalciteContextException> errorSupplier)
Ensures that a source value does not violate the constraint of the target column. -
Uses of SqlNode in org.apache.calcite.prepare
Fields in org.apache.calcite.prepare declared as SqlNode Modifier and Type Field Description private SqlNode
PlannerImpl. validatedSqlNode
Methods in org.apache.calcite.prepare that return SqlNode Modifier and Type Method Description SqlNode
PlannerImpl. parse(java.io.Reader reader)
SqlNode
PlannerImpl. validate(SqlNode sqlNode)
Methods in org.apache.calcite.prepare that return types with arguments of type SqlNode Modifier and Type Method Description Pair<SqlNode,RelDataType>
PlannerImpl. validateAndGetType(SqlNode sqlNode)
Methods in org.apache.calcite.prepare with parameters of type SqlNode Modifier and Type Method Description private CalcitePrepare.AnalyzeViewResult
CalcitePrepareImpl. analyze_(SqlValidator validator, java.lang.String sql, SqlNode sqlNode, RelRoot root, boolean fail)
RelNode
PlannerImpl. convert(SqlNode sql)
private CalcitePrepare.ParseResult
CalcitePrepareImpl. convert_(CalcitePrepare.Context context, java.lang.String sql, boolean analyze, boolean fail, CalciteCatalogReader catalogReader, SqlValidator validator, SqlNode sqlNode1)
protected RelNode
CalcitePrepareImpl.CalcitePreparingStmt. decorrelate(SqlToRelConverter sqlToRelConverter, SqlNode query, RelNode rootRel)
protected abstract RelNode
Prepare. decorrelate(SqlToRelConverter sqlToRelConverter, SqlNode query, RelNode rootRel)
void
CalcitePrepareImpl. executeDdl(CalcitePrepare.Context context, SqlNode node)
Prepare.PreparedResult
Prepare. prepareSql(SqlNode sqlQuery, java.lang.Class runtimeContextClass, SqlValidator validator, boolean needsValidation)
Prepare.PreparedResult
Prepare. prepareSql(SqlNode sqlQuery, SqlNode sqlNodeOriginal, java.lang.Class runtimeContextClass, SqlValidator validator, boolean needsValidation)
RelRoot
PlannerImpl. rel(SqlNode sql)
SqlNode
PlannerImpl. validate(SqlNode sqlNode)
Pair<SqlNode,RelDataType>
PlannerImpl. validateAndGetType(SqlNode sqlNode)
-
Uses of SqlNode in org.apache.calcite.rel.rel2sql
Fields in org.apache.calcite.rel.rel2sql declared as SqlNode Modifier and Type Field Description (package private) SqlNode
SqlImplementor.Result. node
Fields in org.apache.calcite.rel.rel2sql with type parameters of type SqlNode Modifier and Type Field Description private java.util.function.IntFunction<SqlNode>
SqlImplementor.SimpleContext. field
protected java.util.Map<java.lang.String,SqlNode>
SqlImplementor. ordinalMap
Methods in org.apache.calcite.rel.rel2sql that return SqlNode Modifier and Type Method 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, java.util.List<SqlNode> nodeList)
private SqlNode
SqlImplementor.Context. createSqlWindowBound(RexWindowBound rexWindowBound)
SqlNode
SqlImplementor.AliasContext. field(int ordinal)
abstract SqlNode
SqlImplementor.Context. field(int ordinal)
SqlNode
SqlImplementor.JoinContext. field(int ordinal)
SqlNode
SqlImplementor.SimpleContext. 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)
private SqlNode
SqlImplementor.Context. withOrder(SqlCall call, SqlNodeList orderList)
Wraps a call in aSqlKind.WITHIN_GROUP
call, iforderList
is non-empty.Methods in org.apache.calcite.rel.rel2sql that return types with arguments of type SqlNode Modifier and Type Method Description java.util.List<SqlNode>
SqlImplementor.Context. fieldList()
private java.util.List<SqlNode>
SqlImplementor.Context. toSql(RexProgram program, java.util.List<RexNode> operandList)
Methods in org.apache.calcite.rel.rel2sql with parameters of type SqlNode Modifier and Type Method Description void
RelToSqlConverter. addSelect(java.util.List<SqlNode> selectList, SqlNode node, RelDataType rowType)
void
SqlImplementor. addSelect(java.util.List<SqlNode> selectList, SqlNode node, RelDataType rowType)
private SqlCall
RelToSqlConverter. as(SqlNode e, java.lang.String alias)
private void
SqlImplementor. collectAliases(com.google.common.collect.ImmutableMap.Builder<java.lang.String,RelDataType> builder, SqlNode node, java.util.Iterator<RelDataType> aliases)
SqlImplementor.Result
SqlImplementor. result(SqlNode node, java.util.Collection<SqlImplementor.Clause> clauses, RelNode rel, java.util.Map<java.lang.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 ...Method parameters in org.apache.calcite.rel.rel2sql with type arguments of type SqlNode Modifier and Type Method Description void
SqlImplementor.Builder. addOrderItem(java.util.List<SqlNode> orderByList, RelFieldCollation field)
(package private) void
SqlImplementor.Context. addOrderItem(java.util.List<SqlNode> orderByList, RelFieldCollation field)
void
RelToSqlConverter. addSelect(java.util.List<SqlNode> selectList, SqlNode node, RelDataType rowType)
void
SqlImplementor. addSelect(java.util.List<SqlNode> selectList, SqlNode node, RelDataType rowType)
private SqlNode
SqlImplementor.Context. createLeftCall(SqlOperator op, java.util.List<SqlNode> nodeList)
private SqlCall
SqlImplementor.Context. createOverCall(SqlAggFunction op, java.util.List<SqlNode> operands, SqlWindow window)
Constructors in org.apache.calcite.rel.rel2sql with parameters of type SqlNode Constructor Description Result(SqlNode node, java.util.Collection<SqlImplementor.Clause> clauses, java.lang.String neededAlias, RelDataType neededType, java.util.Map<java.lang.String,RelDataType> aliases)
Constructor parameters in org.apache.calcite.rel.rel2sql with type arguments of type SqlNode Constructor Description SimpleContext(SqlDialect dialect, java.util.function.IntFunction<SqlNode> field)
-
Uses of SqlNode in org.apache.calcite.rex
Fields in org.apache.calcite.rex declared as SqlNode Modifier and Type Field Description private SqlNode
RexWindowBound.RexWindowBoundUnbounded. node
Methods in org.apache.calcite.rex that return SqlNode Modifier and Type Method Description SqlNode
RexSqlConvertlet. convertCall(RexToSqlNodeConverter converter, RexCall call)
SqlNode
RexSqlStandardConvertletTable. convertCall(RexToSqlNodeConverter converter, RexCall call)
Converts a call to an operator into aSqlCall
to the same operator.SqlNode
RexSqlStandardConvertletTable.EquivConvertlet. convertCall(RexToSqlNodeConverter converter, RexCall call)
SqlNode
RexToSqlNodeConverter. convertCall(RexCall call)
SqlNode
RexToSqlNodeConverterImpl. convertCall(RexCall call)
private SqlNode[]
RexSqlStandardConvertletTable. convertExpressionList(RexToSqlNodeConverter converter, java.util.List<RexNode> nodes)
SqlNode
RexToSqlNodeConverter. convertInputRef(RexInputRef ref)
Converts aRexInputRef
to aSqlIdentifier
.SqlNode
RexToSqlNodeConverterImpl. convertInputRef(RexInputRef ref)
SqlNode
RexToSqlNodeConverter. convertLiteral(RexLiteral literal)
Converts aRexLiteral
to aSqlLiteral
.SqlNode
RexToSqlNodeConverterImpl. convertLiteral(RexLiteral literal)
SqlNode
RexToSqlNodeConverter. convertNode(RexNode node)
SqlNode
RexToSqlNodeConverterImpl. convertNode(RexNode node)
Methods in org.apache.calcite.rex with parameters of type SqlNode Modifier and Type Method Description static RexWindowBound
RexWindowBound. create(SqlNode node, RexNode rexNode)
Creates window bound.Constructors in org.apache.calcite.rex with parameters of type SqlNode Constructor Description RexWindowBoundUnbounded(SqlNode node)
-
Uses of SqlNode in org.apache.calcite.schema
Methods in org.apache.calcite.schema with parameters of type SqlNode Modifier and Type Method Description boolean
Table. rolledUpColumnValidInsideAgg(java.lang.String column, SqlCall call, SqlNode parent, CalciteConnectionConfig config)
Determines whether the given rolled up column can be used inside the given aggregate function. -
Uses of SqlNode in org.apache.calcite.schema.impl
Methods in org.apache.calcite.schema.impl with parameters of type SqlNode Modifier and Type Method Description boolean
AbstractTable. rolledUpColumnValidInsideAgg(java.lang.String column, SqlCall call, SqlNode parent, CalciteConnectionConfig config)
-
Uses of SqlNode in org.apache.calcite.sql
Subclasses of SqlNode in org.apache.calcite.sql Modifier and Type Class 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 ofSqlCall
that keeps its operands in an array.class
SqlBinaryStringLiteral
A binary (or hexadecimal) string literal.class
SqlCall
ASqlCall
is a call to anoperator
.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 asDATE '2004-10-22'
.class
SqlDdl
Base class for CREATE, DROP and other DDL statements.class
SqlDelete
ASqlDelete
is a node of a parse tree which represents a DELETE statement.class
SqlDescribeSchema
ASqlDescribeSchema
is a node of a parse tree that represents aDESCRIBE SCHEMA
statement.class
SqlDescribeTable
ASqlDescribeTable
is a node of a parse tree that represents aDESCRIBE TABLE
statement.class
SqlDrop
Base class for an DROP statements parse tree nodes.class
SqlDynamicParam
ASqlDynamicParam
represents a dynamic parameter marker in an SQL statement.class
SqlExplain
ASqlExplain
is a node of a parse tree which represents an EXPLAIN PLAN statement.class
SqlIdentifier
ASqlIdentifier
is an identifier, possibly compound.class
SqlInsert
ASqlInsert
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 aJOIN
clause.class
SqlLiteral
ASqlLiteral
is a constant.class
SqlMatchRecognize
SqlNode for MATCH_RECOGNIZE clause.class
SqlMerge
ASqlMerge
is a node of a parse tree which represents a MERGE statement.class
SqlNodeList
ASqlNodeList
is a list ofSqlNode
s.class
SqlNumericLiteral
A numeric SQL literal.class
SqlOrderBy
Parse tree node that represents anORDER BY
on a query other than aSELECT
(e.g.class
SqlSelect
ASqlSelect
is a node of a parse tree which represents a select statement.class
SqlSetOption
SQL parse tree node to representSET
andRESET
statements, optionally preceded byALTER SYSTEM
orALTER SESSION
.class
SqlTimeLiteral
A SQL literal representing a TIME value, for exampleTIME '14:33:44.567'
.class
SqlTimestampLiteral
A SQL literal representing a TIMESTAMP value, for exampleTIMESTAMP '1969-07-21 03:15 GMT'
.class
SqlUpdate
ASqlUpdate
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.Fields in org.apache.calcite.sql declared as SqlNode Modifier and Type Field Description private SqlNode
SqlMatchRecognize. after
SqlNode
SqlWith. body
(package private) SqlNode
SqlDelete. condition
(package private) SqlNode
SqlJoin. condition
(package private) SqlNode
SqlMerge. condition
(package private) SqlNode
SqlUpdate. condition
static SqlNode[]
SqlNode. EMPTY_ARRAY
(package private) SqlNode
SqlExplain. explicandum
SqlNode
SqlOrderBy. fetch
(package private) SqlNode
SqlSelect. 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
SqlNode
SqlOrderBy. offset
(package private) SqlNode
SqlSelect. 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
SqlDelete. targetTable
(package private) SqlNode
SqlInsert. targetTable
(package private) SqlNode
SqlMerge. targetTable
(package private) SqlNode
SqlUpdate. 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
Fields in org.apache.calcite.sql with type parameters of type SqlNode Modifier and Type Field Description private java.util.List<SqlNode>
SqlUtil.Genealogist. ancestors
private java.util.List<SqlNode>
SqlNodeList. list
private java.util.function.Predicate<SqlNode>
SqlUtil.Genealogist. postPredicate
private java.util.function.Predicate<SqlNode>
SqlUtil.Genealogist. predicate
Methods in org.apache.calcite.sql with type parameters of type SqlNode Modifier and Type Method Description static <E extends SqlNode>
ESqlNode. clone(E e)
Creates a copy of a SqlNode.<S extends SqlNode>
SSqlBasicCall. operand(int i)
<S extends SqlNode>
SSqlCall. operand(int i)
Methods in org.apache.calcite.sql that return SqlNode Modifier and Type Method Description (package private) static SqlNode
SqlUtil. andExpressions(SqlNode node1, SqlNode node2)
SqlNode
SqlBasicCall. clone(SqlParserPos pos)
SqlNode
SqlCall. clone(SqlParserPos pos)
SqlNode
SqlDataTypeSpec. clone(SqlParserPos pos)
SqlNode
SqlDynamicParam. clone(SqlParserPos pos)
SqlNode
SqlIdentifier. clone(SqlParserPos pos)
SqlNode
SqlIntervalQualifier. clone(SqlParserPos pos)
abstract SqlNode
SqlNode. clone(SqlParserPos pos)
Clones a SqlNode with a different position.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 ornull
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
SqlDelete. getCondition()
Gets the filter condition for rows to be deleted.SqlNode
SqlJoin. getCondition()
SqlNode
SqlMerge. getCondition()
SqlNode
SqlUpdate. getCondition()
Gets the filter condition for rows to be updated.SqlNode
SqlExplain. getExplicandum()
SqlNode
SqlSelect. getFetch()
SqlNode
SqlSelect. getFrom()
static SqlNode
SqlUtil. getFromNode(SqlSelect query, int ordinal)
Returns then
th (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 thei
th select-list item of a query.SqlNode
SqlInsert. getSource()
SqlNode
SqlMerge. getSourceTableRef()
SqlNode
SqlMatchRecognize. getTableRef()
SqlNode
SqlDelete. getTargetTable()
SqlNode
SqlInsert. getTargetTable()
SqlNode
SqlMerge. getTargetTable()
SqlNode
SqlUpdate. 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 inSqlJdbcFunctionCall.PermutingMakeCall.order
to reorder a SqlNode[] array.SqlNode
SqlJdbcFunctionCall. rewriteCall(SqlValidator validator, SqlCall call)
SqlNode
SqlOperator. rewriteCall(SqlValidator validator, SqlCall call)
Rewrites a call to this operator.SqlNode
SqlProcedureCallOperator. 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()
Methods in org.apache.calcite.sql that return types with arguments of type SqlNode Modifier and Type Method Description protected java.util.List<SqlNode>
SqlOperator. constructOperandList(SqlValidator validator, SqlCall call, java.util.List<java.lang.String> argNames)
(package private) static java.util.ArrayList<SqlNode>
SqlUtil. flatten(SqlNode node)
static com.google.common.collect.ImmutableList<SqlNode>
SqlUtil. getAncestry(SqlNode root, java.util.function.Predicate<SqlNode> predicate, java.util.function.Predicate<SqlNode> postPredicate)
Returns a list of ancestors ofpredicate
within a givenSqlNode
tree.java.util.List<SqlNode>
SqlNodeList. getList()
java.util.List<SqlNode>
SqlBasicCall. getOperandList()
abstract java.util.List<SqlNode>
SqlCall. getOperandList()
java.util.List<SqlNode>
SqlDelete. getOperandList()
java.util.List<SqlNode>
SqlDescribeSchema. getOperandList()
java.util.List<SqlNode>
SqlDescribeTable. getOperandList()
java.util.List<SqlNode>
SqlExplain. getOperandList()
java.util.List<SqlNode>
SqlInsert. getOperandList()
java.util.List<SqlNode>
SqlJoin. getOperandList()
java.util.List<SqlNode>
SqlMatchRecognize. getOperandList()
java.util.List<SqlNode>
SqlMerge. getOperandList()
java.util.List<SqlNode>
SqlOrderBy. getOperandList()
java.util.List<SqlNode>
SqlSelect. getOperandList()
java.util.List<SqlNode>
SqlSetOption. getOperandList()
java.util.List<SqlNode>
SqlUpdate. getOperandList()
java.util.List<SqlNode>
SqlWindow. getOperandList()
java.util.List<SqlNode>
SqlWith. getOperandList()
java.util.List<SqlNode>
SqlWithItem. getOperandList()
java.util.Iterator<SqlNode>
SqlNodeList. iterator()
java.util.List<SqlNode>
SqlCallBinding. operands()
Returns the operands to a call permuted into the same order as the formal parameters of the function.private java.util.List<SqlNode>
SqlCallBinding. permutedOperands(SqlCall call)
Returns the operands to a call permuted into the same order as the formal parameters of the function.Methods in org.apache.calcite.sql with parameters of type SqlNode Modifier and Type Method Description void
SqlNodeList. add(SqlNode node)
(package private) static SqlNode
SqlUtil. andExpressions(SqlNode node1, SqlNode node2)
private java.lang.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
SqlJdbcFunctionCall. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
SqlCall
SqlJdbcFunctionCall.MakeCall. createCall(SqlParserPos pos, SqlNode... operands)
Creates and return aSqlCall
.SqlCall
SqlJdbcFunctionCall.PermutingMakeCall. createCall(SqlParserPos pos, SqlNode... operands)
SqlCall
SqlJdbcFunctionCall.SimpleMakeCall. createCall(SqlParserPos pos, SqlNode... operands)
SqlCall
SqlJoin.SqlJoinOperator. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
SqlCall
SqlMatchRecognize.SqlMatchRecognizeOperator. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
SqlCall
SqlOperator. createCall(SqlParserPos pos, SqlNode... operands)
Creates a call to this operand with an array of operands.SqlCall
SqlOperator. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
Creates a call to this operand with an array of 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 theSELECT
operator.SqlCall
SqlWindow.SqlWindowOperator. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
SqlCall
SqlWith.SqlWithOperator. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
SqlCall
SqlWithItem.SqlWithItemOperator. createCall(SqlLiteral functionQualifier, 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 ornull
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 (usingequalsDeep(SqlNode, Litmus)
) or are both null.boolean
SqlCall. equalsDeep(SqlNode node, Litmus litmus)
boolean
SqlDataTypeSpec. equalsDeep(SqlNode node, Litmus litmus)
boolean
SqlDynamicParam. equalsDeep(SqlNode node, Litmus litmus)
boolean
SqlIdentifier. equalsDeep(SqlNode node, Litmus litmus)
boolean
SqlIntervalQualifier. equalsDeep(SqlNode node, Litmus litmus)
boolean
SqlLiteral. equalsDeep(SqlNode node, Litmus litmus)
boolean
SqlNode. equalsDeep(SqlNode node, boolean fail)
Deprecated.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
SqlWindow. equalsDeep(SqlNode node, Litmus litmus)
Overridden method to specifically check only the right subtree of a window definition.void
SqlWriter. fetchOffset(SqlNode fetch, SqlNode offset)
Prints the OFFSET/FETCH clause.(package private) static java.util.ArrayList<SqlNode>
SqlUtil. flatten(SqlNode node)
private static void
SqlUtil. flatten(SqlNode node, java.util.ArrayList<SqlNode> list)
static com.google.common.collect.ImmutableList<SqlNode>
SqlUtil. getAncestry(SqlNode root, java.util.function.Predicate<SqlNode> predicate, java.util.function.Predicate<SqlNode> postPredicate)
Returns a list of ancestors ofpredicate
within a givenSqlNode
tree.static SqlNode
SqlUtil. getSelectListItem(SqlNode query, int i)
Returns thei
th 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 nestedCAST(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)
private java.lang.Void
SqlUtil.Genealogist. postCheck(SqlNode node)
private java.lang.Void
SqlUtil.Genealogist. preCheck(SqlNode node)
protected SqlNode[]
SqlJdbcFunctionCall.PermutingMakeCall. reorder(SqlNode[] operands)
Uses the data inSqlJdbcFunctionCall.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 theSqlSampleSpec
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
SqlBasicCall. setOperand(int i, SqlNode operand)
void
SqlCall. setOperand(int i, SqlNode operand)
Changes the value of an operand.void
SqlDelete. setOperand(int i, SqlNode operand)
void
SqlDescribeSchema. setOperand(int i, SqlNode operand)
void
SqlDescribeTable. setOperand(int i, SqlNode operand)
void
SqlExplain. setOperand(int i, SqlNode operand)
void
SqlInsert. setOperand(int i, SqlNode operand)
void
SqlJoin. setOperand(int i, SqlNode operand)
void
SqlMatchRecognize. setOperand(int i, SqlNode operand)
void
SqlMerge. setOperand(int i, SqlNode operand)
void
SqlSelect. setOperand(int i, SqlNode operand)
void
SqlSetOption. setOperand(int i, SqlNode operand)
void
SqlUpdate. setOperand(int i, SqlNode operand)
void
SqlWindow. setOperand(int i, SqlNode operand)
private static boolean
SqlWindow. setOperand(SqlNode clonedOperand, SqlNode thatOperand, SqlValidator validator)
void
SqlWith. setOperand(int i, SqlNode operand)
void
SqlWithItem. 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 java.lang.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 SqlNodeListstatic 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 java.lang.Comparable
SqlLiteral. value(SqlNode node)
Extracts the value from a literal.private void
SqlUtil.Genealogist. visitChild(SqlNode node)
Method parameters in org.apache.calcite.sql with type arguments of type SqlNode Modifier and Type Method Description protected java.util.List<RelDataType>
SqlOperator. constructArgTypeList(SqlValidator validator, SqlValidatorScope scope, SqlCall call, java.util.List<SqlNode> args, boolean convertRowArgToColumnList)
private boolean
SqlFunction. containsRowArg(java.util.List<SqlNode> args)
SqlCall
SqlOperator. createCall(SqlParserPos pos, java.util.List<? extends SqlNode> operandList)
Creates a call to this operand with a list of operands.static boolean
SqlNode. equalDeep(java.util.List<SqlNode> operands0, java.util.List<SqlNode> operands1, Litmus litmus)
Returns whether two lists of operands are equal.private static void
SqlUtil. flatten(SqlNode node, java.util.ArrayList<SqlNode> list)
static com.google.common.collect.ImmutableList<SqlNode>
SqlUtil. getAncestry(SqlNode root, java.util.function.Predicate<SqlNode> predicate, java.util.function.Predicate<SqlNode> postPredicate)
Returns a list of ancestors ofpredicate
within a givenSqlNode
tree.Constructors in org.apache.calcite.sql with parameters of type SqlNode Constructor 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, java.lang.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 parameters in org.apache.calcite.sql with type arguments of type SqlNode Constructor Description Genealogist(java.util.function.Predicate<SqlNode> predicate, java.util.function.Predicate<SqlNode> postPredicate)
SqlNodeList(java.util.Collection<? extends SqlNode> collection, SqlParserPos pos)
Creates aSqlNodeList
containing the nodes inlist
. -
Uses of SqlNode in org.apache.calcite.sql.advise
Methods in org.apache.calcite.sql.advise that return SqlNode Modifier and Type Method Description protected SqlNode
SqlAdvisor. collectParserError(java.lang.String sql, java.util.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(java.lang.String sql)
Wrapper function to parse a SQL query (SELECT or VALUES, but not INSERT, UPDATE, DELETE, CREATE, DROP etc.), throwing aSqlParseException
if the statement is not syntactically valid.private SqlNode
SqlAdvisor. tryParse(java.lang.String sql, java.util.List<SqlMoniker> hintList)
Tries to parse a SQL statement.Methods in org.apache.calcite.sql.advise with parameters of type SqlNode Modifier and Type Method 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, java.lang.String hintToken)
protected void
SqlAdvisorValidator. validateFrom(SqlNode node, RelDataType targetRowType, SqlValidatorScope scope)
-
Uses of SqlNode in org.apache.calcite.sql.ddl
Subclasses of SqlNode in org.apache.calcite.sql.ddl Modifier and Type Class Description class
SqlAttributeDefinition
Parse tree for SqlAttributeDefinition, which is part of aSqlCreateType
.class
SqlCheckConstraint
Parse tree forUNIQUE
,PRIMARY KEY
constraints.class
SqlColumnDeclaration
Parse tree forUNIQUE
,PRIMARY KEY
constraints.class
SqlCreateForeignSchema
Parse tree forCREATE FOREIGN SCHEMA
statement.class
SqlCreateFunction
Parse tree forCREATE FUNCTION
statement.class
SqlCreateMaterializedView
Parse tree forCREATE MATERIALIZED VIEW
statement.class
SqlCreateSchema
Parse tree forCREATE SCHEMA
statement.class
SqlCreateTable
Parse tree forCREATE TABLE
statement.class
SqlCreateType
Parse tree forCREATE TYPE
statement.class
SqlCreateView
Parse tree forCREATE VIEW
statement.class
SqlDropFunction
Parse tree forDROP FUNCTION
statement.class
SqlDropMaterializedView
Parse tree forDROP MATERIALIZED VIEW
statement.(package private) class
SqlDropObject
Base class for parse trees ofDROP TABLE
,DROP VIEW
,DROP MATERIALIZED VIEW
andDROP TYPE
statements.class
SqlDropSchema
Parse tree forDROP TABLE
statement.class
SqlDropTable
Parse tree forDROP TABLE
statement.class
SqlDropType
Parse tree forDROP TYPE
statement.class
SqlDropView
Parse tree forDROP VIEW
statement.class
SqlKeyConstraint
Parse tree forUNIQUE
,PRIMARY KEY
constraints.Fields in org.apache.calcite.sql.ddl declared as SqlNode Modifier and Type Field Description private SqlNode
SqlCreateFunction. className
(package private) SqlNode
SqlCreateTable.ColumnDef. expr
(package private) SqlNode
SqlAttributeDefinition. expression
private SqlNode
SqlCheckConstraint. expression
(package private) SqlNode
SqlColumnDeclaration. expression
private SqlNode
SqlCreateForeignSchema. library
private SqlNode
SqlCreateMaterializedView. query
private SqlNode
SqlCreateTable. query
private SqlNode
SqlCreateView. query
private SqlNode
SqlCreateForeignSchema. type
Methods in org.apache.calcite.sql.ddl that return SqlNode Modifier and Type Method Description static SqlNode
SqlDdlNodes. attribute(SqlParserPos pos, SqlIdentifier name, SqlDataTypeSpec dataType, SqlNode expression, SqlCollation collation)
Creates a attribute definition.static SqlNode
SqlDdlNodes. check(SqlParserPos pos, SqlIdentifier name, SqlNode expression)
Creates a CHECK constraint.static SqlNode
SqlDdlNodes. column(SqlParserPos pos, SqlIdentifier name, SqlDataTypeSpec dataType, SqlNode expression, ColumnStrategy strategy)
Creates a column declaration.(package private) static SqlNode
SqlDdlNodes. renameColumns(SqlNodeList columnList, SqlNode query)
Wraps a query to rename its columns.Methods in org.apache.calcite.sql.ddl that return types with arguments of type SqlNode Modifier and Type Method Description java.util.List<SqlNode>
SqlAttributeDefinition. getOperandList()
java.util.List<SqlNode>
SqlCheckConstraint. getOperandList()
java.util.List<SqlNode>
SqlColumnDeclaration. getOperandList()
java.util.List<SqlNode>
SqlCreateForeignSchema. getOperandList()
java.util.List<SqlNode>
SqlCreateFunction. getOperandList()
java.util.List<SqlNode>
SqlCreateMaterializedView. getOperandList()
java.util.List<SqlNode>
SqlCreateSchema. getOperandList()
java.util.List<SqlNode>
SqlCreateTable. getOperandList()
java.util.List<SqlNode>
SqlCreateType. getOperandList()
java.util.List<SqlNode>
SqlCreateView. getOperandList()
java.util.List<SqlNode>
SqlDropObject. getOperandList()
java.util.List<SqlNode>
SqlDropSchema. getOperandList()
java.util.List<SqlNode>
SqlKeyConstraint. getOperandList()
private static java.util.List<Pair<SqlIdentifier,SqlNode>>
SqlCreateForeignSchema. options(SqlNodeList optionList)
Methods in org.apache.calcite.sql.ddl with parameters of type SqlNode Modifier and Type Method Description static SqlNode
SqlDdlNodes. attribute(SqlParserPos pos, SqlIdentifier name, SqlDataTypeSpec dataType, SqlNode expression, SqlCollation collation)
Creates a attribute definition.static SqlNode
SqlDdlNodes. check(SqlParserPos pos, SqlIdentifier name, SqlNode expression)
Creates a CHECK constraint.static SqlNode
SqlDdlNodes. column(SqlParserPos pos, SqlIdentifier name, SqlDataTypeSpec dataType, SqlNode expression, ColumnStrategy strategy)
Creates a column declaration.static SqlCreateForeignSchema
SqlDdlNodes. createForeignSchema(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, SqlNode type, SqlNode library, SqlNodeList optionList)
Creates a CREATE FOREIGN SCHEMA.static SqlCreateFunction
SqlDdlNodes. createFunction(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, SqlNode className, SqlNodeList usingList)
Creates a CREATE FUNCTION.static SqlCreateMaterializedView
SqlDdlNodes. createMaterializedView(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, SqlNodeList columnList, SqlNode query)
Creates a CREATE MATERIALIZED VIEW.static SqlCreateTable
SqlDdlNodes. createTable(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, SqlNodeList columnList, SqlNode query)
Creates a CREATE TABLE.static SqlCreateView
SqlDdlNodes. createView(SqlParserPos pos, boolean replace, SqlIdentifier name, SqlNodeList columnList, SqlNode query)
Creates a CREATE VIEW.(package private) static SqlCreateTable.ColumnDef
SqlCreateTable.ColumnDef. of(SqlNode expr, RelDataType type, ColumnStrategy strategy)
protected static void
SqlDdlNodes. populate(SqlIdentifier name, SqlNode query, CalcitePrepare.Context context)
Populates the table calledname
by executingquery
.(package private) static SqlNode
SqlDdlNodes. renameColumns(SqlNodeList columnList, SqlNode query)
Wraps a query to rename its columns.private static java.lang.Comparable
SqlCreateForeignSchema. value(SqlNode node)
Returns the value of a literal, convertingNlsString
into String.Constructors in org.apache.calcite.sql.ddl with parameters of type SqlNode Constructor Description ColumnDef(SqlNode expr, RelDataType type, ColumnStrategy strategy)
SqlAttributeDefinition(SqlParserPos pos, SqlIdentifier name, SqlDataTypeSpec dataType, SqlNode expression, SqlCollation collation)
SqlCheckConstraint(SqlParserPos pos, SqlIdentifier name, SqlNode expression)
Creates a SqlCheckConstraint; useSqlDdlNodes.check(org.apache.calcite.sql.parser.SqlParserPos, org.apache.calcite.sql.SqlIdentifier, org.apache.calcite.sql.SqlNode)
.SqlColumnDeclaration(SqlParserPos pos, SqlIdentifier name, SqlDataTypeSpec dataType, SqlNode expression, ColumnStrategy strategy)
SqlCreateForeignSchema(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, SqlNode type, SqlNode library, SqlNodeList optionList)
Creates a SqlCreateForeignSchema.SqlCreateFunction(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, SqlNode className, SqlNodeList usingList)
Creates a SqlCreateFunction.SqlCreateMaterializedView(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, SqlNodeList columnList, SqlNode query)
Creates a SqlCreateView.SqlCreateTable(SqlParserPos pos, boolean replace, boolean ifNotExists, SqlIdentifier name, SqlNodeList columnList, SqlNode query)
Creates a SqlCreateTable.SqlCreateView(SqlParserPos pos, boolean replace, SqlIdentifier name, SqlNodeList columnList, SqlNode query)
Creates a SqlCreateView. -
Uses of SqlNode in org.apache.calcite.sql.dialect
Methods in org.apache.calcite.sql.dialect that return SqlNode Modifier and Type Method Description SqlNode
HiveSqlDialect. emulateNullDirection(SqlNode node, boolean nullsFirst, boolean desc)
SqlNode
JethroDataSqlDialect. emulateNullDirection(SqlNode node, boolean nullsFirst, boolean desc)
SqlNode
MysqlSqlDialect. emulateNullDirection(SqlNode node, boolean nullsFirst, boolean desc)
SqlNode
MysqlSqlDialect. getCastSpec(RelDataType type)
SqlNode
PostgresqlSqlDialect. getCastSpec(RelDataType type)
SqlNode
HsqldbSqlDialect. rewriteSingleValueExpr(SqlNode aggCall)
SqlNode
MysqlSqlDialect. rewriteSingleValueExpr(SqlNode aggCall)
Methods in org.apache.calcite.sql.dialect with parameters of type SqlNode Modifier and Type Method Description SqlNode
HiveSqlDialect. emulateNullDirection(SqlNode node, boolean nullsFirst, boolean desc)
SqlNode
JethroDataSqlDialect. 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
HiveSqlDialect. unparseOffsetFetch(SqlWriter writer, SqlNode offset, SqlNode fetch)
void
HsqldbSqlDialect. unparseOffsetFetch(SqlWriter writer, SqlNode offset, SqlNode fetch)
void
MysqlSqlDialect. unparseOffsetFetch(SqlWriter writer, SqlNode offset, SqlNode fetch)
void
RedshiftSqlDialect. unparseOffsetFetch(SqlWriter writer, SqlNode offset, SqlNode fetch)
-
Uses of SqlNode in org.apache.calcite.sql.fun
Subclasses of SqlNode in org.apache.calcite.sql.fun Modifier and Type Class Description class
SqlCase
ASqlCase
is a node of a parse tree which represents a case statement.Fields in org.apache.calcite.sql.fun declared as SqlNode Modifier and Type Field Description (package private) SqlNode
SqlCase. elseExpr
(package private) SqlNode
SqlCase. value
Methods in org.apache.calcite.sql.fun that return SqlNode Modifier and Type Method Description SqlNode
SqlCase. getElseOperand()
SqlNode
SqlCase. getValueOperand()
SqlNode
SqlCoalesceFunction. rewriteCall(SqlValidator validator, SqlCall call)
SqlNode
SqlDatePartFunction. rewriteCall(SqlValidator validator, SqlCall call)
SqlNode
SqlNewOperator. rewriteCall(SqlValidator validator, SqlCall call)
SqlNode
SqlNullifFunction. rewriteCall(SqlValidator validator, SqlCall call)
Methods in org.apache.calcite.sql.fun that return types with arguments of type SqlNode Modifier and Type Method Description static java.util.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).java.util.List<SqlNode>
SqlCase. getOperandList()
Methods in org.apache.calcite.sql.fun with parameters of type SqlNode Modifier and Type Method Description (package private) boolean
SqlBetweenOperator.AndFinder. containsAnd(SqlNode node)
SqlCall
SqlCaseOperator. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
SqlCall
SqlJsonArrayFunction. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
SqlCall
SqlJsonObjectFunction. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
SqlCall
SqlJsonQueryFunction. createCall(SqlLiteral functionQualifier, SqlParserPos pos, SqlNode... operands)
SqlCall
SqlJsonValueFunction. 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
WHEN whenList[0] THEN thenList[0]
WHEN whenList[1] THEN thenList[1]
...
ELSE elseClause
ENDprivate <E extends java.lang.Enum<E>>
ESqlJsonArrayFunction. getEnumValue(SqlNode operand)
private <E extends java.lang.Enum<E>>
ESqlJsonObjectFunction. getEnumValue(SqlNode operand)
private <E extends java.lang.Enum<E>>
ESqlJsonQueryFunction. getEnumValue(SqlNode operand)
void
SqlCase. setOperand(int i, SqlNode operand)
Constructors in org.apache.calcite.sql.fun with parameters of type SqlNode Constructor Description SqlCase(SqlParserPos pos, SqlNode value, SqlNodeList whenList, SqlNodeList thenList, SqlNode elseExpr)
Creates a SqlCase expression. -
Uses of SqlNode in org.apache.calcite.sql.parser
Methods in org.apache.calcite.sql.parser that return SqlNode Modifier and Type Method Description private static SqlNode
SqlParserUtil. convert(PrecedenceClimbingParser.Token token)
SqlNode
SqlParserUtil.OldTokenSequenceImpl. node(int i)
SqlNode
SqlParserUtil.TokenSequenceImpl. node(int i)
SqlNode
SqlParser. parseExpression()
Parses a SQL expression.SqlNode
SqlParser. parseQuery()
Parses aSELECT
statement.SqlNode
SqlParser. parseQuery(java.lang.String sql)
Parses aSELECT
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(java.util.List<SqlNode> list)
static SqlNode[]
SqlParserUtil. toNodeArray(SqlNodeList list)
static SqlNode
SqlParserUtil. toTree(java.util.List<java.lang.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.Methods in org.apache.calcite.sql.parser with parameters of type SqlNode Modifier and Type Method 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.OldTokenSequenceImpl. replaceSublist(int start, int end, SqlNode e)
void
SqlParserUtil.TokenSequenceImpl. 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 java.util.List<SqlParserPos>
SqlParserPos. toPos(SqlNode[] nodes)
Method parameters in org.apache.calcite.sql.parser with type arguments of type SqlNode Modifier and Type Method Description Span
Span. addAll(java.lang.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, java.lang.Iterable<? extends SqlNode> operands)
Creates a call.static Span
Span. of(java.util.Collection<? extends SqlNode> nodes)
Creates a Span of a list of nodes.SqlParserPos
SqlParserPos. plusAll(java.util.Collection<SqlNode> nodeList)
Combines this parser position with a list of positions.static SqlParserPos
SqlParserPos. sum(java.util.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(java.util.List<SqlNode> list)
private static java.lang.Iterable<SqlParserPos>
SqlParserPos. toPos(java.lang.Iterable<SqlNode> nodes)
-
Uses of SqlNode in org.apache.calcite.sql.pretty
Methods in org.apache.calcite.sql.pretty with parameters of type SqlNode Modifier and Type Method Description void
SqlPrettyWriter. fetchOffset(SqlNode fetch, SqlNode offset)
java.lang.String
SqlPrettyWriter. format(SqlNode node)
-
Uses of SqlNode in org.apache.calcite.sql.type
Methods in org.apache.calcite.sql.type with parameters of type SqlNode Modifier and Type Method Description boolean
CompositeSingleOperandTypeChecker. checkSingleOperandType(SqlCallBinding callBinding, SqlNode node, int iFormalOperand, boolean throwOnFailure)
boolean
FamilyOperandTypeChecker. checkSingleOperandType(SqlCallBinding callBinding, SqlNode node, int iFormalOperand, boolean throwOnFailure)
boolean
LiteralOperandTypeChecker. checkSingleOperandType(SqlCallBinding callBinding, SqlNode node, int iFormalOperand, boolean throwOnFailure)
boolean
OperandTypes.PeriodOperandTypeChecker. 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.Method parameters in org.apache.calcite.sql.type with type arguments of type SqlNode Modifier and Type Method Description static java.util.List<RelDataType>
SqlTypeUtil. deriveAndCollectTypes(SqlValidator validator, SqlValidatorScope scope, java.util.List<SqlNode> operands)
Iterates over all operands, derives their types, and collects them into a list.static boolean
SqlTypeUtil. isCharTypeComparable(SqlCallBinding binding, java.util.List<SqlNode> operands, boolean throwOnFailure)
Returns whether the operands to a call are char type-comparable. -
Uses of SqlNode in org.apache.calcite.sql.util
Fields in org.apache.calcite.sql.util declared as SqlNode Modifier and Type Field Description (package private) SqlNode[]
SqlShuttle.CallCopyingArgHandler. clonedOperands
Methods in org.apache.calcite.sql.util that return SqlNode Modifier and Type Method 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)
Methods in org.apache.calcite.sql.util with parameters of type SqlNode Modifier and Type Method 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)
Method parameters in org.apache.calcite.sql.util with type arguments of type SqlNode Modifier and Type Method Description SqlNode
SqlShuttle.CallCopyingArgHandler. visitChild(SqlVisitor<SqlNode> visitor, SqlNode expr, int i, SqlNode operand)
-
Uses of SqlNode in org.apache.calcite.sql.validate
Fields in org.apache.calcite.sql.validate declared as SqlNode Modifier and Type Field Description protected SqlNode
AbstractNamespace. enclosingNode
private SqlNode
TableScope. node
(package private) SqlNode
SqlValidatorImpl.NavigationExpander. offset
(package private) SqlNode
SqlValidatorImpl.ExtendedExpander. root
private SqlNode
SqlValidatorImpl.OrderExpressionExpander. root
private SqlNode
SqlValidatorImpl.ValidationError. sqlNode
private SqlNode
SqlValidatorImpl. top
Fields in org.apache.calcite.sql.validate with type parameters of type SqlNode Modifier and Type Field Description private java.util.Set<SqlNode>
SqlValidatorImpl. cursorSet
Set of select expressions used as cursor definitions.private java.util.List<SqlNode>
SelectScope. expandedSelectList
com.google.common.collect.ImmutableList<SqlNode>
AggregatingSelectScope.Resolved. extraExprList
private java.util.List<SqlNode>
AggChecker. extraExprs
(package private) java.util.List<SqlNode>
SqlValidatorUtil.GroupAnalyzer. extraExprs
Extra expressions, computed from the input as extra GROUP BY expressions.com.google.common.collect.ImmutableList<SqlNode>
AggregatingSelectScope.Resolved. groupExprList
private java.util.List<SqlNode>
AggChecker. groupExprs
(package private) java.util.List<SqlNode>
SqlValidatorUtil.GroupAnalyzer. groupExprs
private java.util.List<Pair<SqlNode,SqlMonotonicity>>
IdentifierNamespace. monotonicExprs
List of monotonic expressions.protected java.util.Map<SqlNode,SqlValidatorNamespace>
SqlValidatorImpl. namespaces
private java.util.Map<SqlNode,RelDataType>
SqlValidatorImpl. nodeToTypeMap
Map of derived RelDataType for each node.private java.util.Map<SqlNode,SqlNode>
SqlValidatorImpl. originalExprs
private java.util.Map<SqlNode,SqlNode>
SqlValidatorImpl. originalExprs
protected java.util.Map<SqlNode,SqlValidatorScope>
SqlValidatorImpl. scopes
Mapsquery node
objects to theSqlValidatorScope
scope created from them.private java.util.List<SqlNode>
AggregatingSelectScope. temporaryGroupExprList
Use while under construction.Methods in org.apache.calcite.sql.validate that return SqlNode Modifier and Type Method Description static SqlNode
SqlValidatorUtil. addAlias(SqlNode expr, java.lang.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)
protected SqlNode
SqlValidatorImpl.Expander. expandDynamicStar(SqlIdentifier id, SqlIdentifier fqId)
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 causesselect
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
AggregatingSelectScope. getNode()
SqlNode
AliasNamespace. getNode()
SqlNode
CatalogScope. getNode()
SqlNode
CollectNamespace. getNode()
SqlNode
CollectScope. getNode()
SqlNode
DelegatingNamespace. getNode()
SqlNode
EmptyScope. getNode()
SqlNode
FieldNamespace. getNode()
SqlNode
GroupByScope. getNode()
SqlNode
IdentifierNamespace. getNode()
SqlNode
JoinNamespace. getNode()
SqlNode
JoinScope. getNode()
SqlNode
MatchRecognizeScope. getNode()
SqlNode
OrderByScope. getNode()
SqlNode
OverScope. getNode()
SqlNode
ParameterNamespace. getNode()
SqlNode
ProcedureNamespace. getNode()
SqlNode
SchemaNamespace. getNode()
SqlNode
SetopNamespace. getNode()
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
TableNamespace. getNode()
SqlNode
TableScope. getNode()
SqlNode
UnnestNamespace. getNode()
SqlNode
WithItemNamespace. getNode()
SqlNode
WithNamespace. getNode()
SqlNode
WithScope. 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, java.lang.String alias)
Allows a subclass to provide information about how to convert an UPDATE into a MERGE via self-join.SqlNode
SqlValidatorImpl.NavigationModifier. go(SqlNode node)
SqlNode
SqlValidatorImpl.OrderExpressionExpander. go()
private SqlNode
SqlValidatorImpl. maybeCast(SqlNode node, RelDataType currentType, RelDataType desiredType)
private SqlNode
SqlValidatorImpl. navigationInDefine(SqlNode node, java.lang.String alpha)
Checks that all pattern variables within a function are the same, and canonizes expressions such asPREV(B.price)
toLAST(B.price, 0)
.private SqlNode
SqlValidatorImpl. navigationInMeasure(SqlNode node, boolean allRows)
private SqlNode
SqlValidatorImpl.OrderExpressionExpander. nthSelectItem(int ordinal, SqlParserPos pos)
Returns theordinal
th 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, boolean register, SqlNode node, SqlNode enclosingNode, java.lang.String alias, SqlNodeList extendList, boolean forceNullable, boolean lateral)
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, java.util.Map<java.lang.String,RelDataType> nameToTypeMap)
Validates an expression tree.SqlNode
SqlValidatorImpl. validateParameterizedExpression(SqlNode topNode, java.util.Map<java.lang.String,RelDataType> nameToTypeMap)
private SqlNode
SqlValidatorImpl. validateScopedExpression(SqlNode topNode, SqlValidatorScope scope)
SqlNode
SqlScopedShuttle. visit(SqlCall call)
SqlNode
SqlValidatorImpl.Expander. visit(SqlIdentifier id)
SqlNode
SqlValidatorImpl.ExtendedExpander. visit(SqlIdentifier id)
SqlNode
SqlValidatorImpl.ExtendedExpander. visit(SqlLiteral literal)
SqlNode
SqlValidatorImpl.NavigationExpander. visit(SqlCall call)
SqlNode
SqlValidatorImpl.NavigationExpander. visit(SqlIdentifier id)
SqlNode
SqlValidatorImpl.NavigationReplacer. visit(SqlCall call)
SqlNode
SqlValidatorImpl.NavigationReplacer. visit(SqlIdentifier id)
SqlNode
SqlValidatorImpl.OrderExpressionExpander. visit(SqlIdentifier id)
SqlNode
SqlValidatorImpl.OrderExpressionExpander. visit(SqlLiteral literal)
SqlNode
SqlValidatorUtil.DeepCopier. visit(SqlDataTypeSpec type)
Deprecated.SqlNode
SqlValidatorUtil.DeepCopier. visit(SqlDynamicParam param)
Deprecated.SqlNode
SqlValidatorUtil.DeepCopier. visit(SqlIdentifier id)
Deprecated.SqlNode
SqlValidatorUtil.DeepCopier. visit(SqlIntervalQualifier intervalQualifier)
Deprecated.SqlNode
SqlValidatorUtil.DeepCopier. visit(SqlLiteral literal)
Deprecated.SqlNode
SqlValidatorUtil.DeepCopier. visit(SqlNodeList list)
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)
protected SqlNode
SqlValidatorUtil.DeepCopier. visitScoped(SqlCall call)
Deprecated.Methods in org.apache.calcite.sql.validate that return types with arguments of type SqlNode Modifier and Type Method Description java.util.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.java.util.List<Pair<SqlNode,SqlMonotonicity>>
AbstractNamespace. getMonotonicExprs()
java.util.List<Pair<SqlNode,SqlMonotonicity>>
DelegatingNamespace. getMonotonicExprs()
java.util.List<Pair<SqlNode,SqlMonotonicity>>
IdentifierNamespace. getMonotonicExprs()
java.util.List<Pair<SqlNode,SqlMonotonicity>>
SqlValidatorNamespace. getMonotonicExprs()
Returns a list of expressions which are monotonic in this namespace.Methods in org.apache.calcite.sql.validate with parameters of type SqlNode Modifier and Type Method Description static SqlNode
SqlValidatorUtil. addAlias(SqlNode expr, java.lang.String alias)
Converts an expression "expr" into "expr AS alias".protected void
SqlValidatorImpl. addToSelectList(java.util.List<SqlNode> list, java.util.Set<java.lang.String> aliases, java.util.List<java.util.Map.Entry<java.lang.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 java.lang.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
AggregatingScope. checkAggregateExpr(SqlNode expr, boolean deep)
Checks whether an expression is constant within the GROUP BY clause.boolean
AggregatingSelectScope. checkAggregateExpr(SqlNode expr, boolean deep)
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, java.lang.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 aSELECT
node.protected SetopNamespace
SqlValidatorImpl. createSetopNamespace(SqlCall call, SqlNode enclosingNode)
Creates a namespace for a set operation (UNION
,INTERSECT
, orEXCEPT
).private SqlModality
SqlValidatorImpl. deduceModality(SqlNode query)
Return the intended modality of a SELECT or set-op.java.lang.String
SqlValidator. deriveAlias(SqlNode node, int ordinal)
Derives an alias for an expression.java.lang.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, java.util.List<SqlNode> selectItems, java.util.Set<java.lang.String> aliases, java.util.List<java.util.Map.Entry<java.lang.String,RelDataType>> fields, boolean includeSystemVars)
IfselectItem
is "*" or "TABLE.*", expands it and returns true; otherwise writes the unexpanded item.private boolean
SqlValidatorImpl. expandStar(java.util.List<SqlNode> selectItems, java.util.Set<java.lang.String> aliases, java.util.List<java.util.Map.Entry<java.lang.String,RelDataType>> fields, boolean includeSystemVars, SelectScope scope, SqlNode node)
SqlCall
AggFinder. findAgg(SqlNode node)
Finds an aggregate.Pair<java.lang.String,SqlValidatorNamespace>
DelegatingScope. findQualifyingTableName(java.lang.String columnName, SqlNode ctx)
Pair<java.lang.String,SqlValidatorNamespace>
EmptyScope. findQualifyingTableName(java.lang.String columnName, SqlNode ctx)
Pair<java.lang.String,SqlValidatorNamespace>
ListScope. findQualifyingTableName(java.lang.String columnName, SqlNode ctx)
Pair<java.lang.String,SqlValidatorNamespace>
SqlValidatorScope. findQualifyingTableName(java.lang.String columnName, SqlNode ctx)
java.util.Map<java.lang.String,ScopeChild>
DelegatingScope. findQualifyingTableNames(java.lang.String columnName, SqlNode ctx, SqlNameMatcher nameMatcher)
java.util.Map<java.lang.String,ScopeChild>
EmptyScope. findQualifyingTableNames(java.lang.String columnName, SqlNode ctx, SqlNameMatcher nameMatcher)
java.util.Map<java.lang.String,ScopeChild>
ListScope. findQualifyingTableNames(java.lang.String columnName, SqlNode ctx, SqlNameMatcher nameMatcher)
java.util.Map<java.lang.String,ScopeChild>
MatchRecognizeScope. findQualifyingTableNames(java.lang.String columnName, SqlNode ctx, SqlNameMatcher nameMatcher)
java.util.Map<java.lang.String,ScopeChild>
SqlValidatorScope. findQualifyingTableNames(java.lang.String columnName, SqlNode ctx, SqlNameMatcher nameMatcher)
Finds all table aliases which are implicitly qualifying an unqualified column name.static java.lang.String
SqlValidatorUtil. getAlias(SqlNode node, int ordinal)
Derives an alias for a node, and invents a mangled identifier if it cannot.private java.util.List<java.lang.String>
SqlValidatorImpl. getFieldOrigin(SqlNode sqlQuery, int i)
java.util.List<java.util.List<java.lang.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.java.util.List<java.util.List<java.lang.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
DelegatingScope. getMonotonicity(SqlNode expr)
SqlMonotonicity
EmptyScope. getMonotonicity(SqlNode expr)
SqlMonotonicity
OverScope. getMonotonicity(SqlNode expr)
SqlMonotonicity
SelectScope. getMonotonicity(SqlNode expr)
SqlMonotonicity
SqlValidatorScope. getMonotonicity(SqlNode expr)
Returns whether an expression is monotonic in this scope.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, java.lang.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 java.lang.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 usesDEFAULT
to populate a given column.private void
SqlValidatorImpl. lookupFromHints(SqlNode node, SqlValidatorScope scope, SqlParserPos pos, java.util.Collection<SqlMoniker> hintList)
private static int
SqlValidatorUtil. lookupGroupExpr(SqlValidatorUtil.GroupAnalyzer groupAnalyzer, SqlNode expr)
int
AggregatingSelectScope.Resolved. lookupGroupingExpr(SqlNode operand)
java.util.List<SqlMoniker>
SqlValidatorImpl. lookupHints(SqlNode topNode, SqlParserPos pos)
java.util.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 aSqlIdentifier
at a given Parser Position in a parsed expression tree Note: call this only afterSqlValidator.validate(org.apache.calcite.sql.SqlNode)
has been called.private SqlNode
SqlValidatorImpl. maybeCast(SqlNode node, RelDataType currentType, RelDataType desiredType)
private SqlNode
SqlValidatorImpl. navigationInDefine(SqlNode node, java.lang.String alpha)
Checks that all pattern variables within a function are the same, and canonizes expressions such asPREV(B.price)
toLAST(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
AggregatingSelectScope. nullifyType(SqlNode node, RelDataType type)
RelDataType
DelegatingScope. nullifyType(SqlNode node, RelDataType type)
RelDataType
EmptyScope. nullifyType(SqlNode node, RelDataType type)
RelDataType
SqlValidatorScope. nullifyType(SqlNode node, RelDataType type)
Converts the type of an expression to nullable, if the context warrants it.protected SqlNode
SqlValidatorImpl. performUnconditionalRewrites(SqlNode node, boolean underFrom)
Performs expression rewrites which are always used unconditionally.private SqlNode
SqlValidatorImpl. registerFrom(SqlValidatorScope parentScope, SqlValidatorScope usingScope, boolean register, SqlNode node, SqlNode enclosingNode, java.lang.String alias, SqlNodeList extendList, boolean forceNullable, boolean lateral)
Registers scopes and namespaces implied a relational expression in the FROM clause.private void
SqlValidatorImpl. registerMatchRecognize(SqlValidatorScope parentScope, SqlValidatorScope usingScope, SqlMatchRecognize call, SqlNode enclosingNode, java.lang.String alias, boolean forceNullable)
private void
SqlValidatorImpl. registerQuery(SqlValidatorScope parentScope, SqlValidatorScope usingScope, SqlNode node, SqlNode enclosingNode, java.lang.String alias, boolean forceNullable)
Registers a query in a parent scope.private void
SqlValidatorImpl. registerQuery(SqlValidatorScope parentScope, SqlValidatorScope usingScope, SqlNode node, SqlNode enclosingNode, java.lang.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, java.lang.String alias, boolean forceNullable)
private void
SqlValidatorImpl. registerSubQueries(SqlValidatorScope parentScope, SqlNode node)
private void
SqlValidatorImpl. registerWith(SqlValidatorScope parentScope, SqlValidatorScope usingScope, SqlWith with, SqlNode enclosingNode, java.lang.String alias, boolean forceNullable, boolean checkUpdate)
void
SqlValidator. removeValidatedNodeType(SqlNode node)
Removes a node from the set of validated nodesvoid
SqlValidatorImpl. removeValidatedNodeType(SqlNode node)
RelDataType
DelegatingScope. resolveColumn(java.lang.String name, SqlNode ctx)
RelDataType
EmptyScope. resolveColumn(java.lang.String name, SqlNode ctx)
RelDataType
ListScope. resolveColumn(java.lang.String columnName, SqlNode ctx)
RelDataType
OrderByScope. resolveColumn(java.lang.String name, SqlNode ctx)
RelDataType
SqlValidatorScope. resolveColumn(java.lang.String name, SqlNode ctx)
Resolves a single identifier to a column, and returns the datatype of that column.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 theSqlValidator
interface.void
SqlValidatorImpl. setValidatedNodeType(SqlNode node, RelDataType type)
Saves the type of aSqlNode
, 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, SqlNodeList orderList, SqlValidatorScope scope)
Validates parameters for aggregate function.void
SqlValidatorImpl. validateAggregateParams(SqlCall aggCall, SqlNode filter, SqlNodeList orderList, SqlValidatorScope scope)
void
AggregatingSelectScope. validateExpr(SqlNode expr)
void
DelegatingScope. validateExpr(SqlNode expr)
void
EmptyScope. validateExpr(SqlNode expr)
void
GroupByScope. validateExpr(SqlNode expr)
void
OrderByScope. validateExpr(SqlNode expr)
private void
SqlValidatorImpl. validateExpr(SqlNode expr, SqlValidatorScope scope)
Validates an expression.void
SqlValidatorScope. validateExpr(SqlNode expr)
Performs any scope-specific validation of 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, java.lang.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, java.util.Map<java.lang.String,RelDataType> nameToTypeMap)
Validates an expression tree.SqlNode
SqlValidatorImpl. validateParameterizedExpression(SqlNode topNode, java.util.Map<java.lang.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, java.lang.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)
Method parameters in org.apache.calcite.sql.validate with type arguments of type SqlNode Modifier and Type Method Description private boolean
SqlValidatorImpl. addOrExpandField(java.util.List<SqlNode> selectItems, java.util.Set<java.lang.String> aliases, java.util.List<java.util.Map.Entry<java.lang.String,RelDataType>> fields, boolean includeSystemVars, SelectScope scope, SqlIdentifier id, RelDataTypeField field)
protected void
SqlValidatorImpl. addToSelectList(java.util.List<SqlNode> list, java.util.Set<java.lang.String> aliases, java.util.List<java.util.Map.Entry<java.lang.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 java.util.List<ImmutableBitSet>
SqlValidatorUtil. analyzeGroupTuple(SqlValidatorScope scope, SqlValidatorUtil.GroupAnalyzer groupAnalyzer, java.util.List<SqlNode> operandList)
Analyzes a tuple in a GROUPING SETS clause.(package private) static void
SqlValidatorUtil. checkIdentifierListForDuplicates(java.util.List<SqlNode> columnList, SqlValidatorImpl.ValidationErrorFunction validationErrorFunction)
Checks that there are no duplicates in a list ofSqlIdentifier
.static java.util.List<java.lang.Object>
SqlUserDefinedTableMacro. convertArguments(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList, Function function, SqlIdentifier opName, boolean failOnNonLiteral)
Converts arguments fromSqlNode
to java object format.private boolean
SqlValidatorImpl. expandSelectItem(SqlNode selectItem, SqlSelect select, RelDataType targetType, java.util.List<SqlNode> selectItems, java.util.Set<java.lang.String> aliases, java.util.List<java.util.Map.Entry<java.lang.String,RelDataType>> fields, boolean includeSystemVars)
IfselectItem
is "*" or "TABLE.*", expands it and returns true; otherwise writes the unexpanded item.private boolean
SqlValidatorImpl. expandStar(java.util.List<SqlNode> selectItems, java.util.Set<java.lang.String> aliases, java.util.List<java.util.Map.Entry<java.lang.String,RelDataType>> fields, boolean includeSystemVars, SelectScope scope, SqlNode node)
SqlCall
AggFinder. findAgg(java.util.List<SqlNode> nodes)
(package private) java.lang.Iterable<SqlCall>
AggFinder. findAll(java.lang.Iterable<SqlNode> nodes)
Creates a copy of this finder that has the same parameters as this, then returns the list of all aggregates found.java.lang.reflect.Type
SqlUserDefinedTableFunction. getElementType(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList)
Returns the row type of the table yielded by this function when applied to given arguments.RelDataType
SqlUserDefinedTableFunction. getRowType(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList)
Returns the record type of the table yielded by this function when applied to given arguments.TranslatableTable
SqlUserDefinedTableMacro. getTable(RelDataTypeFactory typeFactory, java.util.List<SqlNode> operandList)
Returns the table in this UDF, or null if there is no table.private void
SqlValidatorImpl. handleScalarSubQuery(SqlSelect parentSelect, SqlSelect selectItem, java.util.List<SqlNode> expandedSelectItems, java.util.Set<java.lang.String> aliasList, java.util.List<java.util.Map.Entry<java.lang.String,RelDataType>> fieldList)
Processes SubQuery found in Select list.void
SqlValidatorImpl.Permute. permute(java.util.List<SqlNode> selectItems, java.util.List<java.util.Map.Entry<java.lang.String,RelDataType>> fields)
Moves fields according to the permutation.void
SelectScope. setExpandedSelectList(java.util.List<SqlNode> selectList)
Constructors in org.apache.calcite.sql.validate with parameters of type SqlNode Constructor 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)
Permute(SqlNode from, int offset)
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 aSetopNamespace
.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 parameters in org.apache.calcite.sql.validate with type arguments of type SqlNode Constructor Description AggChecker(SqlValidatorImpl validator, AggregatingScope scope, java.util.List<SqlNode> extraExprs, java.util.List<SqlNode> groupExprs, boolean distinct)
Creates an AggChecker.GroupAnalyzer(java.util.List<SqlNode> groupExprs)
Resolved(java.util.List<SqlNode> extraExprList, java.util.List<SqlNode> groupExprList, java.lang.Iterable<ImmutableBitSet> groupSets, java.util.Map<java.lang.Integer,java.lang.Integer> groupExprProjection)
-
Uses of SqlNode in org.apache.calcite.sql2rel
Fields in org.apache.calcite.sql2rel declared as SqlNode Modifier and Type Field Description (package private) SqlNode
SqlToRelConverter.SubQuery. node
Fields in org.apache.calcite.sql2rel with type parameters of type SqlNode Modifier and Type Field Description private java.util.Map<SqlNode,RexNode>
SqlToRelConverter.AggConverter. aggMapping
private java.util.Map<SqlNode,Ord<AuxiliaryConverter>>
SqlToRelConverter.AggConverter. auxiliaryGroupExprs
The auxiliary group-by expressions.private java.util.Map<SqlNode,RexNode>
SqlToRelConverter. mapConvertedNonCorrSubqs
Mapping of non-correlated sub-queries that have been converted to their equivalent constants.Methods in org.apache.calcite.sql2rel that return SqlNode Modifier and Type Method Description private SqlNode
StandardConvertletTable.AvgVarianceConvertlet. expandAvg(SqlNode arg, RelDataType avgType, SqlRexContext cx)
private SqlNode
StandardConvertletTable.RegrCovarianceConvertlet. expandCovariance(SqlNode arg0Input, SqlNode arg1Input, SqlNode dependent, RelDataType varType, SqlRexContext cx, boolean biased)
private SqlNode
StandardConvertletTable.RegrCovarianceConvertlet. expandRegrSzz(SqlNode arg1, SqlNode arg2, RelDataType avgType, SqlRexContext cx, boolean variance)
private SqlNode
StandardConvertletTable.AvgVarianceConvertlet. expandVariance(SqlNode argInput, RelDataType varType, SqlRexContext cx, boolean biased, boolean sqrt)
private SqlNode
StandardConvertletTable.AvgVarianceConvertlet. getCastedSqlNode(SqlNode argInput, RelDataType varType, SqlParserPos pos, RexNode argRex)
private SqlNode
StandardConvertletTable.RegrCovarianceConvertlet. getCastedSqlNode(SqlNode argInput, RelDataType varType, SqlParserPos pos, RexNode argRex)
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 aSqlNode
that has been created during the Sql-to-Rel process.Methods in org.apache.calcite.sql2rel that return types with arguments of type SqlNode Modifier and Type Method Description java.util.Map<SqlNode,RexNode>
SqlToRelConverter. getMapConvertedNonCorrSubqs()
Methods in org.apache.calcite.sql2rel with parameters of type SqlNode Modifier and Type Method 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 aSqlInOperator
.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.Blackboard. convertExpression(SqlNode expr)
RexNode
SqlToRelConverter. convertExpression(SqlNode node)
RexNode
SqlToRelConverter. convertExpression(SqlNode node, java.util.Map<java.lang.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, java.util.List<SqlNode> orderExprList, SqlNode offset, SqlNode fetch)
Converts a query's ORDER BY clause, if any.protected RelFieldCollation
SqlToRelConverter. convertOrderItem(SqlSelect select, SqlNode orderItem, java.util.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, java.util.Collection<SqlNode> rows, boolean allowLiteralsOnly, RelDataType targetRowType)
RexFieldCollation
SqlToRelConverter.Blackboard. convertSortExpression(SqlNode expr, RelFieldCollation.Direction direction, RelFieldCollation.NullDirection nullDirection)
Converts an item in an ORDER BY clause inside a window (OVER) 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, java.util.List<SqlNode> orderExprList)
RelNode
SqlToRelConverter. decorrelate(SqlNode query, RelNode rootRel)
If sub-query is correlated and decorrelation is enabled, performs decorrelation.private java.lang.String
SqlToRelConverter. deriveAlias(SqlNode node, java.util.Collection<java.lang.String> aliases, int ordinal)
private SqlNode
StandardConvertletTable.AvgVarianceConvertlet. expandAvg(SqlNode arg, RelDataType avgType, SqlRexContext cx)
private SqlNode
StandardConvertletTable.RegrCovarianceConvertlet. expandCovariance(SqlNode arg0Input, SqlNode arg1Input, SqlNode dependent, RelDataType varType, SqlRexContext cx, boolean biased)
private SqlNode
StandardConvertletTable.RegrCovarianceConvertlet. expandRegrSzz(SqlNode arg1, SqlNode arg2, RelDataType avgType, SqlRexContext cx, boolean variance)
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 allIN
orEXISTS
operators inside SQL parse tree.private SqlNode
StandardConvertletTable.AvgVarianceConvertlet. getCastedSqlNode(SqlNode argInput, RelDataType varType, SqlParserPos pos, RexNode argRex)
private SqlNode
StandardConvertletTable.RegrCovarianceConvertlet. getCastedSqlNode(SqlNode argInput, RelDataType varType, SqlParserPos pos, RexNode argRex)
(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 aSqlNode
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, SqlNodeList orderList, SqlCall outerCall)
Method parameters in org.apache.calcite.sql2rel with type arguments of type SqlNode Modifier and Type Method Description void
SqlToRelConverter. addConvertedNonCorrSubqs(java.util.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, java.util.List<SqlNode> orderExprList)
Converts the SELECT, GROUP BY and HAVING clauses of an aggregate query.private static java.util.List<RexNode>
StandardConvertletTable. convertExpressionList(SqlRexContext cx, java.util.List<SqlNode> nodes, SqlOperandTypeChecker.Consistency consistency)
private RelNode
SqlToRelConverter. convertMultisets(java.util.List<SqlNode> operands, SqlToRelConverter.Blackboard bb)
protected void
SqlToRelConverter. convertOrder(SqlSelect select, SqlToRelConverter.Blackboard bb, RelCollation collation, java.util.List<SqlNode> orderExprList, SqlNode offset, SqlNode fetch)
Converts a query's ORDER BY clause, if any.protected RelFieldCollation
SqlToRelConverter. convertOrderItem(SqlSelect select, SqlNode orderItem, java.util.List<SqlNode> extraExprs, RelFieldCollation.Direction direction, RelFieldCollation.NullDirection nullDirection)
private RelNode
SqlToRelConverter. convertRowValues(SqlToRelConverter.Blackboard bb, SqlNode rowList, java.util.Collection<SqlNode> rows, boolean allowLiteralsOnly, RelDataType targetRowType)
private void
SqlToRelConverter. convertSelectList(SqlToRelConverter.Blackboard bb, SqlSelect select, java.util.List<SqlNode> orderList)
protected void
SqlToRelConverter. createAggImpl(SqlToRelConverter.Blackboard bb, SqlToRelConverter.AggConverter aggConverter, SqlNodeList selectList, SqlNodeList groupList, SqlNode having, java.util.List<SqlNode> orderExprList)
protected void
SqlToRelConverter. gatherOrderExprs(SqlToRelConverter.Blackboard bb, SqlSelect select, SqlNodeList orderList, java.util.List<SqlNode> extraOrderExprs, java.util.List<RelFieldCollation> collationList)
Creates a list of collations required to implement the ORDER BY clause, if there is one.Constructors in org.apache.calcite.sql2rel with parameters of type SqlNode Constructor Description SubQuery(SqlNode node, RelOptUtil.Logic logic)
-
Uses of SqlNode in org.apache.calcite.tools
Methods in org.apache.calcite.tools that return SqlNode Modifier and Type Method Description SqlNode
Planner. parse(java.io.Reader source)
Parses and validates a SQL statement.default SqlNode
Planner. parse(java.lang.String sql)
Parses and validates a SQL statement.SqlNode
Planner. validate(SqlNode sqlNode)
Validates a SQL statement.Methods in org.apache.calcite.tools that return types with arguments of type SqlNode Modifier and Type Method Description Pair<SqlNode,RelDataType>
Planner. validateAndGetType(SqlNode sqlNode)
Validates a SQL statement.Methods in org.apache.calcite.tools with parameters of type SqlNode Modifier and Type Method 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.
-