Package org.apache.calcite.sql.validate
Class SqlValidatorImpl.OrderExpressionExpander
- java.lang.Object
-
- org.apache.calcite.sql.util.SqlBasicVisitor<SqlNode>
-
- org.apache.calcite.sql.util.SqlShuttle
-
- org.apache.calcite.sql.validate.SqlScopedShuttle
-
- org.apache.calcite.sql.validate.SqlValidatorImpl.OrderExpressionExpander
-
- All Implemented Interfaces:
SqlVisitor<SqlNode>
- Enclosing class:
- SqlValidatorImpl
class SqlValidatorImpl.OrderExpressionExpander extends SqlScopedShuttle
Shuttle which walks over an expression in the ORDER BY clause, replacing usages of aliases with the underlying expression.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.calcite.sql.util.SqlShuttle
SqlShuttle.CallCopyingArgHandler
-
Nested classes/interfaces inherited from class org.apache.calcite.sql.util.SqlBasicVisitor
SqlBasicVisitor.ArgHandler<R>, SqlBasicVisitor.ArgHandlerImpl<R>
-
-
Constructor Summary
Constructors Constructor Description OrderExpressionExpander(SqlSelect select, SqlNode root)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SqlNode
go()
private SqlNode
nthSelectItem(int ordinal, SqlParserPos pos)
Returns theordinal
th item in the select list.SqlNode
visit(SqlIdentifier id)
Visits an identifier.SqlNode
visit(SqlLiteral literal)
Visits a literal.protected SqlNode
visitScoped(SqlCall call)
Visits an operator call.-
Methods inherited from class org.apache.calcite.sql.validate.SqlScopedShuttle
getScope, visit
-
Methods inherited from class org.apache.calcite.sql.util.SqlShuttle
visit, visit, visit, visit
-
-
-
-
Method Detail
-
go
public SqlNode go()
-
visit
public SqlNode visit(SqlLiteral literal)
Description copied from interface:SqlVisitor
Visits a literal.- Specified by:
visit
in interfaceSqlVisitor<SqlNode>
- Overrides:
visit
in classSqlShuttle
- Parameters:
literal
- Literal- See Also:
SqlLiteral.accept(SqlVisitor)
-
nthSelectItem
private SqlNode nthSelectItem(int ordinal, SqlParserPos pos)
Returns theordinal
th item in the select list.
-
visit
public SqlNode visit(SqlIdentifier id)
Description copied from interface:SqlVisitor
Visits an identifier.- Specified by:
visit
in interfaceSqlVisitor<SqlNode>
- Overrides:
visit
in classSqlShuttle
- Parameters:
id
- identifier- See Also:
SqlIdentifier.accept(SqlVisitor)
-
visitScoped
protected SqlNode visitScoped(SqlCall call)
Description copied from class:SqlScopedShuttle
Visits an operator call. If the call has entered a new scope, the base class will have already modified the scope.- Overrides:
visitScoped
in classSqlScopedShuttle
-
-