org.apache.derby.impl.sql.compile
Class VerifyAggregateExpressionsVisitor
java.lang.Object
org.apache.derby.impl.sql.compile.VerifyAggregateExpressionsVisitor
- All Implemented Interfaces:
- Visitor
- public class VerifyAggregateExpressionsVisitor
- extends java.lang.Object
- implements Visitor
If a RCL (SELECT list) contains an aggregate, then we must verify
that the RCL (SELECT list) is valid.
For ungrouped queries,
the RCL must be composed entirely of valid aggregate expressions -
in this case, no column references outside of an aggregate.
For grouped aggregates,
the RCL must be composed of grouping columns or valid aggregate
expressions - in this case, the only column references allowed outside of
an aggregate are grouping columns.
- Author:
- jamie, from code written by jerry
Method Summary |
boolean |
skipChildren(Visitable node)
Don't visit children under an aggregate |
boolean |
stopTraversal()
Method that is called to see
if query tree traversal should be
stopped before visiting all nodes.
|
Visitable |
visit(Visitable node)
Verify that this expression is ok
for an aggregate query. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
groupByList
private GroupByList groupByList
VerifyAggregateExpressionsVisitor
public VerifyAggregateExpressionsVisitor(GroupByList groupByList)
visit
public Visitable visit(Visitable node)
throws StandardException
- Verify that this expression is ok
for an aggregate query.
- Specified by:
visit
in interface Visitor
- Parameters:
node
- the node to process
- Returns:
- me
- Throws:
StandardException
- on ColumnReferernce not
in group by list, ValueNode or
JavaValueNode that isn't under an
aggregate
skipChildren
public boolean skipChildren(Visitable node)
- Don't visit children under an aggregate
- Specified by:
skipChildren
in interface Visitor
- Parameters:
node
- the node to process
- Returns:
- true/false
stopTraversal
public boolean stopTraversal()
- Description copied from interface:
Visitor
- Method that is called to see
if query tree traversal should be
stopped before visiting all nodes.
Useful for short circuiting traversal
if we already know we are done.
- Specified by:
stopTraversal
in interface Visitor
- Returns:
- true/false
Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.