/** * Creates an expression which references correlating variable <code> * correlName</code> from the context of <code>rel</code>. For example, if <code>correlName</code> * is set by the 1st child of <code>rel</code>'s 2nd child, then this method returns <code> * $input2.$input1</code>. */ public Expression makeReference(String correlName, RelNode rel) { JavaFrame frame = (JavaFrame) mapCorrel2Frame.get(correlName); assert (frame != null); assert Util.equal(frame.rel.getCorrelVariable(), correlName); assert (frame.hasVariable()); return frame.getVariable(); }