@Override public void meet(final LeftJoin leftJoin) { if (leftJoin.getLeftArg().getBindingNames().containsAll(filterVars)) { leftJoin.getLeftArg().visit(this); } else { relocate(filter, leftJoin.getLeftArg()); } }
@Override public void meet(LeftJoin leftJoin) { if (leftJoin.getLeftArg().getBindingNames().containsAll(filterVars)) { leftJoin.getLeftArg().visit(this); } else { relocate(filter, leftJoin); } }
@Override public void meet(LeftJoin leftJoin) { if (leftJoin.getLeftArg().getBindingNames().containsAll(filterVars)) { leftJoin.getLeftArg().visit(this); } else { relocate(filter, leftJoin); } }
@Override public void meet(LeftJoin leftJoin) { leftJoin.getLeftArg().visit(this); Set<String> origBoundVars = boundVars; try { boundVars = new HashSet<String>(boundVars); boundVars.addAll(leftJoin.getLeftArg().getBindingNames()); leftJoin.getRightArg().visit(this); } finally { boundVars = origBoundVars; } }
@Override public void meet(LeftJoin leftJoin) { leftJoin.getLeftArg().visit(this); Set<String> origBoundVars = boundVars; try { boundVars = new HashSet<String>(boundVars); boundVars.addAll(leftJoin.getLeftArg().getBindingNames()); leftJoin.getRightArg().visit(this); } finally { boundVars = origBoundVars; } }
@Override public void meet(LeftJoin leftJoin) { leftJoin.getLeftArg().visit(this); Set<String> origBoundVars = boundVars; try { boundVars = new HashSet<String>(boundVars); boundVars.addAll(leftJoin.getLeftArg().getBindingNames()); leftJoin.getRightArg().visit(this); } finally { boundVars = origBoundVars; } }
public Set<String> getBindingNames() { Set<String> bindingNames = new LinkedHashSet<String>(16); bindingNames.addAll(getLeftArg().getBindingNames()); bindingNames.addAll(getRightArg().getBindingNames()); return bindingNames; }
@Override public void meet(LeftJoin leftJoin) { leftJoin.getLeftArg().visit(this); Set<String> origBoundVars = boundVars; try { boundVars = new HashSet<String>(boundVars); boundVars.addAll(leftJoin.getLeftArg().getBindingNames()); leftJoin.getRightArg().visit(this); } finally { boundVars = origBoundVars; } }
@Override public Set<String> getBindingNames() { Set<String> bindingNames = new LinkedHashSet<>(16); bindingNames.addAll(getLeftArg().getBindingNames()); bindingNames.addAll(getRightArg().getBindingNames()); return bindingNames; }
/** * @inheritDoc */ @Override public void meet(LeftJoin theJoin) throws Exception { binaryOpMeet(theJoin, theJoin.getLeftArg(), theJoin.getRightArg()); }
/** * @inheritDoc */ @Override public void meet(LeftJoin theJoin) throws Exception { binaryOpMeet(theJoin, theJoin.getLeftArg(), theJoin.getRightArg()); }
/** * @inheritDoc */ @Override public void meet(LeftJoin theJoin) throws Exception { binaryOpMeet(theJoin, theJoin.getLeftArg(), theJoin.getRightArg()); }
public LeftJoinIterator(EvaluationStrategy strategy, LeftJoin join, BindingSet bindings) throws QueryEvaluationException { this.strategy = strategy; this.join = join; this.scopeBindingNames = join.getBindingNames(); leftIter = strategy.evaluate(join.getLeftArg(), bindings); // Initialize with empty iteration so that var is never null rightIter = new EmptyIteration<BindingSet, QueryEvaluationException>(); }
@Override public void meet(LeftJoin node) { node.getLeftArg().visit(this); double leftArgCost = this.cardinality; node.getRightArg().visit(this); cardinality *= leftArgCost; }
@Override public void meet(LeftJoin node) { node.getLeftArg().visit(this); double leftArgCost = this.cardinality; node.getRightArg().visit(this); cardinality *= leftArgCost; }
public LeftJoinIterator(EvaluationStrategy strategy, LeftJoin join, BindingSet bindings) throws QueryEvaluationException { this.strategy = strategy; this.join = join; this.scopeBindingNames = join.getBindingNames(); leftIter = strategy.evaluate(join.getLeftArg(), bindings); // Initialize with empty iteration so that var is never null rightIter = new EmptyIteration<BindingSet, QueryEvaluationException>(); }
public FlattenedOptional(LeftJoin node) { rightArgs = getJoinArgs(node.getRightArg(), new HashSet<TupleExpr>()); boundVars = setWithOutConstants( Sets.intersection(node.getLeftArg().getAssuredBindingNames(), node.getRightArg().getBindingNames())); unboundVars = setWithOutConstants(Sets.difference(node.getRightArg().getBindingNames(), boundVars)); condition = node.getCondition(); rightArg = node.getRightArg(); getVarCounts(node); assuredBindingNames = new HashSet<>(leftArgVarCounts.keySet()); bindingNames = new HashSet<>(Sets.union(assuredBindingNames, unboundVars)); }
@Override public void meet(final LeftJoin node) { // Extract the metadata that will be stored for the node. final String leftJoinNodeId = nodeIds.getOrMakeId(node); final QueryModelNode left = node.getLeftArg(); final QueryModelNode right = node.getRightArg(); // Update the metadata for the JoinMetadata.Builder. makeJoinMetadata(leftJoinNodeId, JoinType.LEFT_OUTER_JOIN, left, right); // Walk to the next node. super.meet(node); }
public HashJoinIteration(EvaluationStrategy strategy, TupleExpr left, TupleExpr right, BindingSet bindings, boolean leftJoin) throws QueryEvaluationException { this(strategy, strategy.evaluate(left, bindings), left.getBindingNames(), strategy.evaluate(right, bindings), right.getBindingNames(), leftJoin); }
public HashJoinIteration(EvaluationStrategy strategy, TupleExpr left, TupleExpr right, BindingSet bindings, boolean leftJoin) throws QueryEvaluationException { this(strategy, strategy.evaluate(left, bindings), left.getBindingNames(), strategy.evaluate(right, bindings), right.getBindingNames(), leftJoin); }