jointree.remove(second);
jointree.remove(first);
}
// join the determined subgraphs and put the join back into jointree!
BasicOperator firstOperand = firstSubGraph.getFirst();
BasicOperator secondOperand = secondSubGraph.getFirst();
Join join = new Join();
HashSet<Variable> joinUnion = new HashSet<Variable>(firstOperand.getUnionVariables());
joinUnion.addAll(secondOperand.getUnionVariables());
join.setUnionVariables(joinUnion);
HashSet<Variable> joinIntersection = new HashSet<Variable>(firstOperand.getUnionVariables());
joinIntersection.retainAll(secondOperand.getUnionVariables());
join.setIntersectionVariables(joinIntersection);
firstOperand.addSucceedingOperator(join, 0);
secondOperand.addSucceedingOperator(join, 1);
jointree.add(new Tuple<BasicOperator, T>(join, mergeInitialInformations(firstSubGraph.getSecond(), secondSubGraph.getSecond())));
}
BasicOperator op = jointree.get(0).getFirst();
op.setSucceedingOperators(indexScan.getSucceedingOperators());
}