/** * Fully expands a RexLocalRef back into a pure RexNode tree containing no * RexLocalRefs (reversing the effect of common subexpression elimination). * For example, <code>program.expandLocalRef(program.getCondition())</code> * will return the expansion of a program's condition. * * @param ref a RexLocalRef from this program * @return expanded form */ public RexNode expandLocalRef(RexLocalRef ref) { // TODO jvs 19-Apr-2006: assert that ref is part of // this program ExpansionShuttle shuttle = new ExpansionShuttle(); return ref.accept(shuttle); }
/** * Fully expands a RexLocalRef back into a pure RexNode tree containing no * RexLocalRefs (reversing the effect of common subexpression elimination). * For example, <code>program.expandLocalRef(program.getCondition())</code> * will return the expansion of a program's condition. * * @param ref a RexLocalRef from this program * * @return expanded form */ public RexNode expandLocalRef(RexLocalRef ref) { // TODO jvs 19-Apr-2006: assert that ref is part of // this program ExpansionShuttle shuttle = new ExpansionShuttle(); return ref.accept(shuttle); }
RexLocalRef ref = oldRef; if (updateRefs) { ref = (RexLocalRef) oldRef.accept(refShuttle); ref = (RexLocalRef) ref.accept(shuttle); this.projectRefList.add(ref); final String name = outFields.get(i).getName(); conditionRef = (RexLocalRef) conditionRef.accept(refShuttle); conditionRef = (RexLocalRef) conditionRef.accept(shuttle); addCondition(conditionRef);
RexLocalRef ref = oldRef; if (updateRefs) { ref = (RexLocalRef) oldRef.accept(refShuttle); ref = (RexLocalRef) ref.accept(shuttle); this.projectRefList.add(ref); final String name = outFields.get(i).getName(); conditionRef = (RexLocalRef) conditionRef.accept(refShuttle); conditionRef = (RexLocalRef) conditionRef.accept(shuttle); addCondition(conditionRef);