Class ReplaceWindowFuncCallsWithCRVisitor
java.lang.Object
org.apache.derby.impl.sql.compile.ReplaceWindowFuncCallsWithCRVisitor
- All Implemented Interfaces:
Visitor
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionReplaceWindowFuncCallsWithCRVisitor(ResultColumnList rcl, int tableNumber, Class<?> skipOverClass) Replace all window function calls with column references. -
Method Summary
Modifier and TypeMethodDescriptionbooleanskipChildren(Visitable node) Don't visit children under the skipOverClass node, if it isn't null.booleanVisitor override.Don't do anything unless we have a window function node node.booleanvisitChildrenFirst(Visitable node) Visitor override.
-
Field Details
-
rcl
-
skipOverClass
-
tableNumber
private int tableNumber
-
-
Constructor Details
-
ReplaceWindowFuncCallsWithCRVisitor
ReplaceWindowFuncCallsWithCRVisitor(ResultColumnList rcl, int tableNumber, Class<?> skipOverClass) Replace all window function calls with column references. Add the reference to the RCL. Delegates most work to WindowFunctionNode.replaceCallsWithColumnReferences(rcl, tableNumber).- Parameters:
rcl- the result column listtableNumber- The tableNumber for the new CRsskipOverClass- Don't go past this
-
-
Method Details
-
visit
Don't do anything unless we have a window function node node. Visitor override.- Specified by:
visitin interfaceVisitor- Parameters:
node- the node to process- Returns:
- a query tree node. Often times this is the same node that was passed in, but Visitors that replace nodes with other nodes will use this to return the new replacement node.
- Throws:
StandardException- may be throw an error as needed by the visitor (i.e. may be a normal error if a particular node is found, e.g. if checking a group by, we don't expect to find any ColumnReferences that aren't under an AggregateNode -- the easiest thing to do is just throw an error when we find the questionable node).- See Also:
-
skipChildren
Don't visit children under the skipOverClass node, if it isn't null. Visitor override.- Specified by:
skipChildrenin interfaceVisitor- Parameters:
node- the node to process- Returns:
- true/false
- See Also:
-
visitChildrenFirst
Visitor override.- Specified by:
visitChildrenFirstin interfaceVisitor- Parameters:
node- the top node of a sub-tree about to be visited- Returns:
- false
- See Also:
-
stopTraversal
public boolean stopTraversal()Visitor override.- Specified by:
stopTraversalin interfaceVisitor- Returns:
- false
- See Also:
-