@Override public Expr copy(final QueryContext qc, final VarScope scp, final IntObjMap<Var> vs) { final Var v = scp.addCopy(var, qc); vs.put(var.id, v); final Spec spec = new Spec(info, v, expr.copy(qc, scp, vs), coll); spec.occluded = occluded; return spec; }
@Override public GroupBy copy(final QueryContext qc, final VarScope scp, final IntObjMap<Var> vs) { // copy the pre-grouping expressions final Expr[] pEx = Arr.copyAll(qc, scp, vs, preExpr); // create fresh copies of the post-grouping variables final Var[] ps = new Var[post.length]; final int pl = ps.length; for (int p = 0; p < pl; p++) { final Var old = post[p]; ps[p] = scp.addCopy(old, qc); vs.put(old.id, ps[p]); } // done return new GroupBy(Arr.copyAll(qc, scp, vs, specs), pEx, ps, nonOcc, info); }
@Override public Count copy(final QueryContext qc, final VarScope scp, final IntObjMap<Var> vs) { final Var v = scp.newCopyOf(qc, var); vs.put(var.id, v); return new Count(v, info); }