upperBound, physical); final RexOver over = new RexOver(type, operator, exprs, window, distinct); RexNode result = over; makeCall( SqlStdOperatorTable.GREATER_THAN, new RexOver( bigintType, SqlStdOperatorTable.COUNT, SqlTypeName.DECIMAL)), new RexOver(typeFactory.createTypeWithNullability(type, false), operator, exprs, window, distinct), false), makeCall( SqlStdOperatorTable.GREATER_THAN_OR_EQUAL, new RexOver( bigintType, SqlStdOperatorTable.COUNT,
upperBound, physical); final RexOver over = new RexOver(type, operator, exprs, window, distinct); RexNode result = over; makeCall( SqlStdOperatorTable.GREATER_THAN, new RexOver( bigintType, SqlStdOperatorTable.COUNT, SqlTypeName.DECIMAL)), new RexOver(typeFactory.createTypeWithNullability(type, false), operator, exprs, window, distinct), false), makeCall( SqlStdOperatorTable.GREATER_THAN_OR_EQUAL, new RexOver( bigintType, SqlStdOperatorTable.COUNT,
public RexNode visitOver(RexOver over) { boolean[] update = {false}; List<RexNode> clonedOperands = visitList(over.operands, update); RexWindow window = visitWindow(over.getWindow()); if (update[0] || (window != over.getWindow())) { // REVIEW jvs 8-Mar-2005: This doesn't take into account // the fact that a rewrite may have changed the result type. // To do that, we would need to take a RexBuilder and // watch out for special operators like CAST and NEW where // the type is embedded in the original call. return new RexOver( over.getType(), over.getAggOperator(), clonedOperands, window, over.isDistinct()); } else { return over; } }
@Override public RexNode visitOver(RexOver over, P arg) { boolean[] update = {false}; List<RexNode> clonedOperands = visitList(over.operands, update, arg); RexWindow window = visitWindow(over.getWindow(), arg); if (update[0] || (window != over.getWindow())) { // REVIEW jvs 8-Mar-2005: This doesn't take into account // the fact that a rewrite may have changed the result type. // To do that, we would need to take a RexBuilder and // watch out for special operators like CAST and NEW where // the type is embedded in the original call. return new RexOver( over.getType(), over.getAggOperator(), clonedOperands, window, over.isDistinct()); } else { return over; } }
public RexNode visitOver(RexOver over) { boolean[] update = {false}; List<RexNode> clonedOperands = visitList(over.operands, update); RexWindow window = visitWindow(over.getWindow()); if (update[0] || (window != over.getWindow())) { // REVIEW jvs 8-Mar-2005: This doesn't take into account // the fact that a rewrite may have changed the result type. // To do that, we would need to take a RexBuilder and // watch out for special operators like CAST and NEW where // the type is embedded in the original call. return new RexOver( over.getType(), over.getAggOperator(), clonedOperands, window, over.isDistinct()); } else { return over; } }