* has no join found, the next "level" will be added to this iterator!
*/
ListIterator<OperatorIDTuple> _succeedingsOfUnionIt = _succeedingsOfUnion.listIterator();
while (true) {
if (!_succeedingsOfUnionIt.hasNext()) break;
OperatorIDTuple _eachSucceedingsOfUnion = _succeedingsOfUnionIt.next();
/*
* Search for a join as succeding of "union"
*/
if (!(_eachSucceedingsOfUnion.getOperator() instanceof lupos.engine.operators.multiinput.join.Join)) {
continue;
}
this.join = (lupos.engine.operators.multiinput.join.Join) _eachSucceedingsOfUnion
.getOperator();
/*
* Now search in join's preceding operators for a new "union" operator (so ignore
* the same way back to the already stored union)
*/
List<BasicOperator> _precedingsOfJoin = this.join.getPrecedingOperators();
for (BasicOperator _eachPrecedingsOfJoin : _precedingsOfJoin) {
/*
* search for an union
*/
if (!(_eachPrecedingsOfJoin instanceof lupos.engine.operators.multiinput.Union)) {
continue;
}
/*
* that is not equal to our already stored "union", because if, we walk the tree back
*/
if (((lupos.engine.operators.multiinput.Union) _eachPrecedingsOfJoin)
.equals(this.u1))
continue;
/*
* store the found second union, as 2nd union
*/
this.u2 = (lupos.engine.operators.multiinput.Union) _eachPrecedingsOfJoin;
/*
* Now search for a SubgraphContainer with the same key, as our already
* stored SubgraphContainer, in the precedings of the 2nd "union"-operator.
*/
List<BasicOperator> _precedingOf2ndUnion = this.u2.getPrecedingOperators();
for (BasicOperator _eachPrecedingOf2ndUnion : _precedingOf2ndUnion) {
if (_eachPrecedingOf2ndUnion.getClass() != lupos.distributed.operator.SubgraphContainer.class) {
continue;
}
/*
* we have to avoid, that the two SubgraphContainer are equal (so we walked back in tree)
*/
if (((lupos.distributed.operator.SubgraphContainer<?>) _eachPrecedingOf2ndUnion)
.equals(this.sg1)) {
continue;
}
/*
* store the key of the 2nd SubgraphContainer
*/
keySg2 = ((lupos.distributed.operator.SubgraphContainer<?>) _eachPrecedingOf2ndUnion)
.getKey();
/*
* now: both keys have to be same!
*/
if (!keySg1.equals(keySg2)) {
/*
* we didn't found any useful "join" at this level of the operator graph,
* so we add next level to the iterator (deep-search-algorithm)
*/
for (OperatorIDTuple nextDeep : _eachSucceedingsOfUnion.getOperator().getSucceedingOperators()) {
/*
* add and rewind, so that this would be the next item in iterator
*/
_succeedingsOfUnionIt.add(nextDeep);
_succeedingsOfUnionIt.previous();