org.eigenbase.sql.validate
Class AggChecker
java.lang.Object
org.eigenbase.sql.util.SqlBasicVisitor<Void>
org.eigenbase.sql.validate.AggChecker
- All Implemented Interfaces:
- SqlVisitor<Void>
class AggChecker
- extends SqlBasicVisitor<Void>
Visitor which throws an exception if any component of the expression is not a
group expression.
- Since:
- Oct 28, 2004
- Version:
- $Id: //open/dev/farrago/src/org/eigenbase/sql/validate/AggChecker.java#14 $
- Author:
- jhyde
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
scopes
private final Stack<SqlValidatorScope> scopes
groupExprs
private final List<SqlNode> groupExprs
distinct
private boolean distinct
validator
private SqlValidatorImpl validator
AggChecker
AggChecker(SqlValidatorImpl validator,
AggregatingScope scope,
List<SqlNode> groupExprs,
boolean distinct)
- Creates an AggChecker.
- Parameters:
validator
- Validatorscope
- ScopegroupExprs
- Expressions in GROUP BY (or SELECT DISTINCT) clause,
that are therefore availabledistinct
- Whether aggregation checking is because of a SELECT
DISTINCT clause
isGroupExpr
boolean isGroupExpr(SqlNode expr)
visit
public Void visit(SqlIdentifier id)
- Description copied from interface:
SqlVisitor
- Visits an identifier.
- Specified by:
visit
in interface SqlVisitor<Void>
- Overrides:
visit
in class SqlBasicVisitor<Void>
- Parameters:
id
- identifier- See Also:
SqlIdentifier.accept(SqlVisitor)
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)