@Override public int hashCode() { return getSubOp().hashCode() ^ OpBase.HashDistinct ; }
public Op getApplicableViews(OpDistinct op, RestrictionManagerImpl restrictions) { return new OpDistinct(_getApplicableViews(op.getSubOp(), restrictions)); }
private Op union(OpBGP opBGP) { // By using the unbinding Var.ANON, the distinct works. // Else, we get duplicates from projection out of the graph var. Var v = Var.ANON ; //varAlloc.allocVar() ; Op op = new OpGraph(v, opBGP) ; op = OpDistinct.create(op) ; return op ; }
public static Op create(Op op) { if ( op instanceof OpDistinct) return op ; return new OpDistinct(op) ; }
public void visit(OpDistinct op) { // TODO Initiation should return a set of initial mappings, // which can then be continued with further iteration of the query // the result of this visitor is then the set of OpMappings that were traversed until the end // // wh //Collection<OpDistinct> initiated = initiate(OpDistinct.class); // op.visit(this); }
@Override public Op1 copy(Op subOp) { return new OpDistinct(subOp) ; }
public void visit(OpDistinct op) { // TODO Initiation should return a set of initial mappings, // which can then be continued with further iteration of the query // the result of this visitor is then the set of OpMappings that were traversed until the end // // wh //Collection<OpDistinct> initiated = initiate(OpDistinct.class); // op.visit(this); }
public Op getApplicableViews(OpDistinct op, RestrictionManagerImpl restrictions) { return new OpDistinct(_getApplicableViews(op.getSubOp(), restrictions)); }
/** * rewrites the subop of distinct */ @Override public void visit(final OpDistinct opDistinct) { if (LOG.isDebugEnabled()) { LOG.debug("Starting visiting OpDistinct"); } addOp(new OpDistinct(rewriteOp1(opDistinct))); }
@Override public Op make(ItemList list) { BuilderLib.checkLength(2, list, "distinct") ; Op sub = build(list, 1) ; return OpDistinct.create(sub) ; } } ;
public static Op _optimize(OpDistinct op, Set<Set<Expr>> cnf) { return new OpDistinct(optimize(op.getSubOp(), cnf)); }
public Op toOp() { Op result = qfpc.toOp(); // Create the projection result = new OpProject(result, new ArrayList<>(projection.getProjectVars())); if(projection.getDistinctLevel() > 0) { result = new OpDistinct(result); } return result; }
public Op toOp(Op result) { if(filter.getExpr().equals(NodeValue.TRUE)) { result = OpFilter.filter(filter.getExpr(), result); } result = OpUtils.applyExtendProject(result, preDistinctVarDefs); if(postDistinctVarDefs != null) { result = OpDistinct.create(result); result = OpUtils.applyExtendProject(result, postDistinctVarDefs); } return result; }
public static Op _replace(OpDistinct op) { return new OpDistinct(replace(op.getSubOp())); }
public Op toOp() { Op result = qfpc.toOp(); // Create the projection result = new OpProject(result, new ArrayList<>(projection.getProjectVars())); if(projection.getDistinctLevel() > 0) { result = new OpDistinct(result); } return result; }