private static class SqlValidatorImpl.NavigationReplacer extends SqlValidatorImpl.NavigationModifier
A as A.price > PREV(B.price) with
PREV(A.price, 0) > LAST(B.price, 0).
Replacing A.price with PREV(A.price, 0) makes the
implementation of
RexVisitor.visitPatternFieldRef(RexPatternFieldRef) more unified.
Otherwise, it's difficult to implement this method. If it returns the
specified field, then the navigation such as PREV(A.price, 1)
becomes impossible; if not, then comparisons such as
A.price > PREV(A.price, 1) become meaningless.
SqlShuttle.CallCopyingArgHandlerSqlBasicVisitor.ArgHandler<R>, SqlBasicVisitor.ArgHandlerImpl<R>| Constructor and Description |
|---|
NavigationReplacer(String alpha) |
| Modifier and Type | Method and Description |
|---|---|
SqlNode |
visit(SqlCall call)
Visits a call to a
SqlOperator. |
SqlNode |
visit(SqlIdentifier id)
Visits an identifier.
|
goprivate final String alpha
NavigationReplacer(String alpha)
public SqlNode visit(SqlCall call)
SqlVisitorSqlOperator.visit in interface SqlVisitor<SqlNode>visit in class SqlShuttlecall - CallSqlCall.accept(SqlVisitor)public SqlNode visit(SqlIdentifier id)
SqlVisitorvisit in interface SqlVisitor<SqlNode>visit in class SqlShuttleid - identifierSqlIdentifier.accept(SqlVisitor)Copyright © 2012–2018 The Apache Software Foundation. All rights reserved.