org.eigenbase.sql.validate
Class SqlValidatorImpl.OrderExpressionExpander

java.lang.Object
  extended by org.eigenbase.sql.util.SqlBasicVisitor<SqlNode>
      extended by org.eigenbase.sql.util.SqlShuttle
          extended by org.eigenbase.sql.validate.SqlScopedShuttle
              extended by org.eigenbase.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.eigenbase.sql.util.SqlShuttle
SqlShuttle.CallCopyingArgHandler
 
Nested classes/interfaces inherited from class org.eigenbase.sql.util.SqlBasicVisitor
SqlBasicVisitor.ArgHandler<R>, SqlBasicVisitor.ArgHandlerImpl<R>
 
Field Summary
private  List<String> aliasList
           
private  SqlNode root
           
private  SqlSelect select
           
 
Constructor Summary
SqlValidatorImpl.OrderExpressionExpander(SqlSelect select, SqlNode root)
           
 
Method Summary
 SqlNode go()
           
private  SqlNode nthSelectItem(int ordinal, SqlParserPos pos)
          Returns the ordinalth 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.eigenbase.sql.validate.SqlScopedShuttle
getScope, visit
 
Methods inherited from class org.eigenbase.sql.util.SqlShuttle
visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aliasList

private final List<String> aliasList

select

private final SqlSelect select

root

private final SqlNode root
Constructor Detail

SqlValidatorImpl.OrderExpressionExpander

SqlValidatorImpl.OrderExpressionExpander(SqlSelect select,
                                         SqlNode root)
Method Detail

go

public SqlNode go()

visit

public SqlNode visit(SqlLiteral literal)
Description copied from interface: SqlVisitor
Visits a literal.

Specified by:
visit in interface SqlVisitor<SqlNode>
Overrides:
visit in class SqlShuttle
Parameters:
literal - Literal
See Also:
SqlLiteral.accept(SqlVisitor)

nthSelectItem

private SqlNode nthSelectItem(int ordinal,
                              SqlParserPos pos)
Returns the ordinalth item in the select list.


visit

public SqlNode visit(SqlIdentifier id)
Description copied from interface: SqlVisitor
Visits an identifier.

Specified by:
visit in interface SqlVisitor<SqlNode>
Overrides:
visit in class SqlShuttle
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 class SqlScopedShuttle