|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.derby.impl.sql.compile.VerifyAggregateExpressionsVisitor
public class VerifyAggregateExpressionsVisitor
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.
Field Summary | |
---|---|
private GroupByList |
groupByList
|
Constructor Summary | |
---|---|
VerifyAggregateExpressionsVisitor(GroupByList groupByList)
|
Method Summary | |
---|---|
boolean |
skipChildren(Visitable node)
Don't visit children under an aggregate, subquery or any node which is equivalent to any of the group by expressions. |
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. |
boolean |
visitChildrenFirst(Visitable node)
Method that is called to see if visit() should be called on
the children of node before it is called on node itself. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private GroupByList groupByList
Constructor Detail |
---|
public VerifyAggregateExpressionsVisitor(GroupByList groupByList)
Method Detail |
---|
public Visitable visit(Visitable node) throws StandardException
visit
in interface Visitor
node
- the node to process
StandardException
- on ColumnReference not
in group by list, ValueNode or
JavaValueNode that isn't under an
aggregatepublic boolean skipChildren(Visitable node) throws StandardException
skipChildren
in interface Visitor
node
- the node to process
StandardException
public boolean stopTraversal()
Visitor
stopTraversal
in interface Visitor
public boolean visitChildrenFirst(Visitable node)
Visitor
visit()
should be called on
the children of node
before it is called on node
itself.
If this method always returns true
, the visitor will walk the
tree bottom-up. If it always returns false
, the tree is visited
top-down.
visitChildrenFirst
in interface Visitor
node
- the top node of a sub-tree about to be visited
true
if node
's children should be visited
before node
, false
otherwise
|
Built on Thu 2010-12-23 20:49:13+0000, from revision ??? | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |