context.getProblems().addError(GraphI18n.tableDoesNotExist, selector.getName());
}
return node;
}
if (source instanceof Join) {
Join join = (Join)source;
// Set up new join node corresponding to this join predicate
PlanNode node = new PlanNode(Type.JOIN);
node.setProperty(Property.JOIN_TYPE, join.getType());
node.setProperty(Property.JOIN_ALGORITHM, JoinAlgorithm.NESTED_LOOP);
node.setProperty(Property.JOIN_CONDITION, join.getJoinCondition());
context.getHints().hasJoin = true;
if (join.getType() == JoinType.LEFT_OUTER) {
context.getHints().hasOptionalJoin = true;
}
// Handle each child
Source[] clauses = new Source[] {join.getLeft(), join.getRight()};
for (int i = 0; i < 2; i++) {
PlanNode sourceNode = createPlanNode(context, clauses[i], usedSelectors);
node.addLastChild(sourceNode);
// Add selectors to the joinNode