org.eigenbase.sql.validate
Class AggFinder
java.lang.Object
org.eigenbase.sql.util.SqlBasicVisitor<Void>
org.eigenbase.sql.validate.AggFinder
- All Implemented Interfaces:
- SqlVisitor<Void>
class AggFinder
- extends SqlBasicVisitor<Void>
Visitor which looks for an aggregate function inside a tree of SqlNode
objects.
- Since:
- Oct 28, 2004
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/validate/AggFinder.java#11 $
- Author:
- jhyde
Field Summary |
private boolean |
over
|
Constructor Summary |
AggFinder(boolean over)
Creates an AggFinder. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
over
private final boolean over
AggFinder
AggFinder(boolean over)
- Creates an AggFinder.
- Parameters:
over
- Whether to find windowed function calls Agg(x) OVER
windowSpec
findAgg
public SqlNode findAgg(SqlNode node)
- Finds an aggregate.
- Parameters:
node
- Parse tree to search
- Returns:
- First aggregate function in parse tree, or null if not found
visit
public Void visit(SqlCall call)
- Description copied from interface:
SqlVisitor
- Visits a call to a
SqlOperator
.
- Specified by:
visit
in interface SqlVisitor<Void>
- Overrides:
visit
in class SqlBasicVisitor<Void>
- Parameters:
call
- Call- See Also:
SqlCall.accept(SqlVisitor)