Class ReplaceWindowFuncCallsWithCRVisitor
- java.lang.Object
-
- org.apache.derby.impl.sql.compile.ReplaceWindowFuncCallsWithCRVisitor
-
-
Field Summary
Fields Modifier and Type Field Description private ResultColumnList
rcl
private java.lang.Class<?>
skipOverClass
private int
tableNumber
-
Constructor Summary
Constructors Constructor Description ReplaceWindowFuncCallsWithCRVisitor(ResultColumnList rcl, int tableNumber, java.lang.Class<?> skipOverClass)
Replace all window function calls with column references.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
skipChildren(Visitable node)
Don't visit children under the skipOverClass node, if it isn't null.boolean
stopTraversal()
Visitor override.Visitable
visit(Visitable node)
Don't do anything unless we have a window function node node.boolean
visitChildrenFirst(Visitable node)
Visitor override.
-
-
-
Field Detail
-
rcl
private ResultColumnList rcl
-
skipOverClass
private java.lang.Class<?> skipOverClass
-
tableNumber
private int tableNumber
-
-
Constructor Detail
-
ReplaceWindowFuncCallsWithCRVisitor
ReplaceWindowFuncCallsWithCRVisitor(ResultColumnList rcl, int tableNumber, java.lang.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 Detail
-
visit
public Visitable visit(Visitable node) throws StandardException
Don't do anything unless we have a window function node node. Visitor override.- Specified by:
visit
in 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:
Visitor.visit(org.apache.derby.iapi.sql.compile.Visitable)
-
skipChildren
public boolean skipChildren(Visitable node)
Don't visit children under the skipOverClass node, if it isn't null. Visitor override.- Specified by:
skipChildren
in interfaceVisitor
- Parameters:
node
- the node to process- Returns:
- true/false
- See Also:
Visitor.skipChildren(org.apache.derby.iapi.sql.compile.Visitable)
-
visitChildrenFirst
public boolean visitChildrenFirst(Visitable node)
Visitor override.- Specified by:
visitChildrenFirst
in interfaceVisitor
- Parameters:
node
- the top node of a sub-tree about to be visited- Returns:
- false
- See Also:
Visitor.visitChildrenFirst(org.apache.derby.iapi.sql.compile.Visitable)
-
stopTraversal
public boolean stopTraversal()
Visitor override.- Specified by:
stopTraversal
in interfaceVisitor
- Returns:
- false
- See Also:
Visitor.skipChildren(org.apache.derby.iapi.sql.compile.Visitable)
-
-