Package org.apache.calcite.sql.validate
Class SqlScopedShuttle
- java.lang.Object
-
- org.apache.calcite.sql.util.SqlBasicVisitor<SqlNode>
-
- org.apache.calcite.sql.util.SqlShuttle
-
- org.apache.calcite.sql.validate.SqlScopedShuttle
-
- All Implemented Interfaces:
SqlVisitor<SqlNode>
- Direct Known Subclasses:
SqlValidatorImpl.Expander
,SqlValidatorImpl.OrderExpressionExpander
,SqlValidatorUtil.DeepCopier
public abstract class SqlScopedShuttle extends SqlShuttle
Refinement toSqlShuttle
which maintains a stack of scopes.Derived class should override
visitScoped(SqlCall)
rather thanSqlVisitor.visit(SqlCall)
.
-
-
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>
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Deque<SqlValidatorScope>
scopes
-
Constructor Summary
Constructors Modifier Constructor Description protected
SqlScopedShuttle(SqlValidatorScope initialScope)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SqlValidatorScope
getScope()
Returns the current scope.SqlNode
visit(SqlCall call)
Visits a call to aSqlOperator
.protected SqlNode
visitScoped(SqlCall call)
Visits an operator call.
-
-
-
Field Detail
-
scopes
private final java.util.Deque<SqlValidatorScope> scopes
-
-
Constructor Detail
-
SqlScopedShuttle
protected SqlScopedShuttle(SqlValidatorScope initialScope)
-
-
Method Detail
-
visit
public final SqlNode visit(SqlCall call)
Description copied from interface:SqlVisitor
Visits a call to aSqlOperator
.- Specified by:
visit
in interfaceSqlVisitor<SqlNode>
- Overrides:
visit
in classSqlShuttle
- Parameters:
call
- Call- See Also:
SqlCall.accept(SqlVisitor)
-
visitScoped
protected SqlNode visitScoped(SqlCall call)
Visits an operator call. If the call has entered a new scope, the base class will have already modified the scope.
-
getScope
protected SqlValidatorScope getScope()
Returns the current scope.
-
-