public R visitOver(RexOver over) { R r = visitCall(over); if (!deep) { return null; } final RexWindow window = over.getWindow(); for (RexFieldCollation orderKey : window.orderKeys) { orderKey.left.accept(this); } for (RexNode partitionKey : window.partitionKeys) { partitionKey.accept(this); } window.getLowerBound().accept(this); window.getUpperBound().accept(this); return r; }
public R visitOver(RexOver over) { R r = visitCall(over); if (!deep) { return null; } final RexWindow window = over.getWindow(); for (RexFieldCollation orderKey : window.orderKeys) { orderKey.left.accept(this); } for (RexNode partitionKey : window.partitionKeys) { partitionKey.accept(this); } window.getLowerBound().accept(this); window.getUpperBound().accept(this); return r; }
public RexWindow visitWindow(RexWindow window) { boolean[] update = {false}; List<RexFieldCollation> clonedOrderKeys = visitFieldCollations(window.orderKeys, update); List<RexNode> clonedPartitionKeys = visitList(window.partitionKeys, update); RexWindowBound lowerBound = window.getLowerBound().accept(this); RexWindowBound upperBound = window.getUpperBound().accept(this); if (update[0] || (lowerBound != window.getLowerBound() && lowerBound != null) || (upperBound != window.getUpperBound() && upperBound != null)) { return new RexWindow( clonedPartitionKeys, clonedOrderKeys, lowerBound, upperBound, window.isRows()); } else { return window; } }
public RexWindow visitWindow(RexWindow window) { boolean[] update = {false}; List<RexFieldCollation> clonedOrderKeys = visitFieldCollations(window.orderKeys, update); List<RexNode> clonedPartitionKeys = visitList(window.partitionKeys, update); RexWindowBound lowerBound = window.getLowerBound().accept(this); RexWindowBound upperBound = window.getUpperBound().accept(this); if (update[0] || (lowerBound != window.getLowerBound() && lowerBound != null) || (upperBound != window.getUpperBound() && upperBound != null)) { return new RexWindow( clonedPartitionKeys, clonedOrderKeys, lowerBound, upperBound, window.isRows()); } else { return window; } }