private static SourceImpl buildJoin(SourceImpl result, SourceImpl last, List<JoinConditionImpl> conditions) { if (result == null) { return last; } List<SourceImpl> selectors = result.getInnerJoinSelectors(); Set<SourceImpl> oldSelectors = new HashSet<SourceImpl>(); oldSelectors.addAll(selectors); Set<SourceImpl> newSelectors = new HashSet<SourceImpl>(); newSelectors.addAll(selectors); newSelectors.add(last); for (JoinConditionImpl j : conditions) { // only join conditions can now be evaluated, // but couldn't be evaluated before if (!j.canEvaluate(oldSelectors) && j.canEvaluate(newSelectors)) { JoinImpl join = new JoinImpl(result, last, JoinType.INNER, j); return join; } } // no join condition was found return null; }
@Override public void addJoinCondition(JoinConditionImpl joinCondition, boolean forThisSelector) { if (forThisSelector) { this.joinCondition = joinCondition; } allJoinConditions.add(joinCondition); if (joinCondition.isParent(this)) { isParent = true; } }
private void pushDown() { if (queryConstraint != null) { queryConstraint.restrictPushDown(this); } if (!outerJoinLeftHandSide && !outerJoinRightHandSide) { for (JoinConditionImpl c : allJoinConditions) { c.restrictPushDown(this); } } }
private boolean evaluateCurrentRow() { if (currentRow.isVirtualRow()) { //null path implies that all checks are already done -- we just need to pass it through return true; } if (!matchesAllTypes && !evaluateTypeMatch()) { return false; } for (ConstraintImpl constraint : selectorConstraints) { if (!constraint.evaluate()) { if (constraint.evaluateStop()) { // stop processing from now on cursor = null; } return false; } } if (joinCondition != null && !joinCondition.evaluate()) { return false; } return true; }
/** * Calls accept on the two sources and the join condition in the join node. */ @Override public boolean visit(JoinImpl node) { node.getLeft().accept(this); node.getRight().accept(this); node.getJoinCondition().accept(this); return true; }
f.setPreparing(preparing); if (joinCondition != null) { joinCondition.restrict(f);
private boolean evaluateCurrentRow() { if (currentRow.isVirtualRow()) { //null path implies that all checks are already done -- we just need to pass it through return true; } if (!matchesAllTypes && !evaluateTypeMatch()) { return false; } for (ConstraintImpl constraint : selectorConstraints) { if (!constraint.evaluate()) { if (constraint.evaluateStop()) { // stop processing from now on cursor = null; } return false; } } if (joinCondition != null && !joinCondition.evaluate()) { return false; } return true; }
/** * Calls accept on the two sources and the join condition in the join node. */ @Override public boolean visit(JoinImpl node) { node.getLeft().accept(this); node.getRight().accept(this); node.getJoinCondition().accept(this); return true; }
f.setPreparing(preparing); if (joinCondition != null) { joinCondition.restrict(f);
private boolean evaluateCurrentRow() { if (currentRow.isVirtualRow()) { //null path implies that all checks are already done -- we just need to pass it through return true; } if (!matchesAllTypes && !evaluateTypeMatch()) { return false; } for (ConstraintImpl constraint : selectorConstraints) { if (!constraint.evaluate()) { if (constraint.evaluateStop()) { // stop processing from now on cursor = null; } return false; } } if (joinCondition != null && !joinCondition.evaluate()) { return false; } return true; }
private void pushDown() { if (queryConstraint != null) { queryConstraint.restrictPushDown(this); } if (!outerJoinLeftHandSide && !outerJoinRightHandSide) { for (JoinConditionImpl c : allJoinConditions) { c.restrictPushDown(this); } } }
/** * Calls accept on the two sources and the join condition in the join node. */ @Override public boolean visit(JoinImpl node) { node.getLeft().accept(this); node.getRight().accept(this); node.getJoinCondition().accept(this); return true; }
@Override public void addJoinCondition(JoinConditionImpl joinCondition, boolean forThisSelector) { if (forThisSelector) { this.joinCondition = joinCondition; } allJoinConditions.add(joinCondition); if (joinCondition.isParent(this)) { isParent = true; } }
private static SourceImpl buildJoin(SourceImpl result, SourceImpl last, List<JoinConditionImpl> conditions) { if (result == null) { return last; } List<SourceImpl> selectors = result.getInnerJoinSelectors(); Set<SourceImpl> oldSelectors = new HashSet<SourceImpl>(); oldSelectors.addAll(selectors); Set<SourceImpl> newSelectors = new HashSet<SourceImpl>(); newSelectors.addAll(selectors); newSelectors.add(last); for (JoinConditionImpl j : conditions) { // only join conditions can now be evaluated, // but couldn't be evaluated before if (!j.canEvaluate(oldSelectors) && j.canEvaluate(newSelectors)) { JoinImpl join = new JoinImpl(result, last, JoinType.INNER, j); return join; } } // no join condition was found return null; }
f.setPreparing(preparing); if (joinCondition != null) { joinCondition.restrict(f);
leftNeedNext = true; } else { if (joinCondition.evaluate()) { foundJoinedRow = true; return true;
private void pushDown() { if (queryConstraint != null) { queryConstraint.restrictPushDown(this); } if (!outerJoinLeftHandSide && !outerJoinRightHandSide) { for (JoinConditionImpl c : allJoinConditions) { c.restrictPushDown(this); } } }
@Override public void addJoinCondition(JoinConditionImpl joinCondition, boolean forThisSelector) { if (forThisSelector) { this.joinCondition = joinCondition; } allJoinConditions.add(joinCondition); if (joinCondition.isParent(this)) { isParent = true; } }
private static SourceImpl buildJoin(SourceImpl result, SourceImpl last, List<JoinConditionImpl> conditions) { if (result == null) { return last; } List<SourceImpl> selectors = result.getInnerJoinSelectors(); Set<SourceImpl> oldSelectors = new HashSet<SourceImpl>(); oldSelectors.addAll(selectors); Set<SourceImpl> newSelectors = new HashSet<SourceImpl>(); newSelectors.addAll(selectors); newSelectors.add(last); for (JoinConditionImpl j : conditions) { // only join conditions can now be evaluated, // but couldn't be evaluated before if (!j.canEvaluate(oldSelectors) && j.canEvaluate(newSelectors)) { JoinImpl join = new JoinImpl(result, last, JoinType.INNER, j); return join; } } // no join condition was found return null; }
leftNeedNext = true; } else { if (joinCondition.evaluate()) { foundJoinedRow = true; return true;