public void visit(OpConditional opCond) { Table left = eval(opCond.getLeft()); // Ref engine - don;'t care about efficiency Table right = eval(opCond.getRight()); Table table = evaluator.condition(left, right); push(table); }
// Modularize. private static Op transformFilterConditional( ExprList exprs, Set<Var> varScope, OpConditional opConditional) { // Any filters that depend on no variables. Op op = insertAnyFilter(exprs, varScope, null); Op left = opConditional.getLeft(); left = transform(exprs, varScope, left); Op right = opConditional.getRight(); op = new OpConditional(left, right); op = insertAnyFilter(exprs, varScope, op); return op; }