public QueryExpr(Scan s) { super(); scan = s; aggregation.addAll(scan.getAggregation()); Schema tmpSchema = scan.getSchema(); type = tmpSchema.getColumn(0).type; }
@Override public DataRecord valueExpr(Env env) { scan.eval(env); if (scan.hasNext()) { Record r = scan.next(); return r.getField(0); } else return Null.getInstance(); }
@Override public String toString() { return "@QueryExpr(" + scan.toString() + ")"; }