/** * {@inheritDoc} * @throws VisitException if exception occurs * * @see QueryObjectModelVisitor#visit(Join) */ public void visit(Join join) throws VisitException { join.getLeft().accept(this); // if (join.getType() != JoinType.INNER) { sb.append(' ').append(join.getType().getSymbol()); // } else { // sb.append(','); // } append(' '); join.getRight().accept(this); append(" ON "); join.getJoinCondition().accept(this); }
/** * @see org.xcmis.search.Visitors.AbstractModelVisitor#visit(org.xcmis.search.model.source.Join) */ @Override public void visit(Join node) throws VisitException { JoinExecutionPlan joinPlan = new JoinExecutionPlan(); joinPlan.setJoinType(node.getType()); joinPlan.setJoinAlgorithm(JoinAlgorithm.NESTED_LOOP); joinPlan.setJoinCondition(node.getJoinCondition()); //left plan node.getLeft().accept(this); joinPlan.setLeftPlan((SourceExecutionPlan)stepsStack.pop()); //right plan node.getRight().accept(this); joinPlan.setRightPlan((SourceExecutionPlan)stepsStack.pop()); }