Package org.apache.calcite.sql.validate
Class AggVisitor
- java.lang.Object
-
- org.apache.calcite.sql.util.SqlBasicVisitor<java.lang.Void>
-
- org.apache.calcite.sql.validate.AggVisitor
-
- All Implemented Interfaces:
SqlVisitor<java.lang.Void>
- Direct Known Subclasses:
AggFinder
,AggFinder.AggIterable
abstract class AggVisitor extends SqlBasicVisitor<java.lang.Void>
Visitor that can find aggregate and windowed aggregate functions.- See Also:
AggFinder
-
-
Nested Class Summary
-
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 protected boolean
aggregate
Whether to find regular (non-windowed) aggregates.protected AggFinder
delegate
protected boolean
group
Whether to find group functions (e.g.protected SqlOperatorTable
opTab
protected boolean
over
Whether to find windowed aggregates.
-
Constructor Summary
Constructors Constructor Description AggVisitor(SqlOperatorTable opTab, boolean over, boolean aggregate, boolean group, AggFinder delegate)
Creates an AggVisitor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.lang.Void
found(SqlCall call)
java.lang.Void
visit(SqlCall call)
Visits a call to aSqlOperator
.
-
-
-
Field Detail
-
opTab
protected final SqlOperatorTable opTab
-
over
protected final boolean over
Whether to find windowed aggregates.
-
delegate
protected final AggFinder delegate
-
aggregate
protected boolean aggregate
Whether to find regular (non-windowed) aggregates.
-
group
protected boolean group
Whether to find group functions (e.g.TUMBLE
) or group auxiliary functions (e.g.TUMBLE_START
).
-
-
Constructor Detail
-
AggVisitor
AggVisitor(SqlOperatorTable opTab, boolean over, boolean aggregate, boolean group, AggFinder delegate)
Creates an AggVisitor.- Parameters:
opTab
- Operator tableover
- Whether to find windowed function callsagg(x) OVER windowSpec
aggregate
- Whether to find non-windowed aggregate callsgroup
- Whether to find group functions (e.g.TUMBLE
)delegate
- Finder to which to delegate when processing the arguments
-
-
Method Detail
-
visit
public java.lang.Void visit(SqlCall call)
Description copied from interface:SqlVisitor
Visits a call to aSqlOperator
.- Specified by:
visit
in interfaceSqlVisitor<java.lang.Void>
- Overrides:
visit
in classSqlBasicVisitor<java.lang.Void>
- Parameters:
call
- Call- See Also:
SqlCall.accept(SqlVisitor)
-
found
protected abstract java.lang.Void found(SqlCall call)
-
-