use of com.sap.hadoop.windowing.query2.definition.OrderDef in project SQLWindowing by hbutani.
the class QueryDefWalker method walk.
/**
* Visit the partition columns and order columns
* Visit the window frame definitions
* @param window
* @throws WindowingException
*/
protected void walk(WindowDef window) throws WindowingException {
if (window == null)
return;
PartitionDef pDef = window.getPartDef();
if (pDef != null) {
ArrayList<ColumnDef> cols = pDef.getColumns();
for (ColumnDef col : cols) {
visitor.visit(col);
}
visitor.visit(pDef);
}
OrderDef oDef = window.getOrderDef();
if (oDef != null) {
ArrayList<OrderColumnDef> ocols = oDef.getColumns();
for (OrderColumnDef ocol : ocols) {
visitor.visit(ocol);
}
visitor.visit(oDef);
}
WindowFrameDef wFrmDef = window.getWindow();
if (wFrmDef != null) {
walk(wFrmDef.getStart());
walk(wFrmDef.getEnd());
visitor.visit(wFrmDef);
}
visitor.visit(window);
}
Aggregations