// not all candidates are found, because this list includes joined branched from both regular inputs and broadcast vars
if (candAtBrancher == null) {
continue;
}
SourceAndDamReport res = in1.getSource().hasDamOnPathDownTo(candAtBrancher);
if (res == NOT_FOUND) {
throw new CompilerException("Bug: Tracing dams for deadlock detection is broken.");
} else if (res == FOUND_SOURCE) {
damOnAllLeftPaths = false;
} else if (res == FOUND_SOURCE_AND_DAM) {
someDamOnLeftPaths = true;
} else {
throw new CompilerException();
}
}
}
if (strategy.secondDam() == DamBehavior.FULL_DAM || in2.getLocalStrategy().dams() || in2.getTempMode().breaksPipeline()) {
someDamOnRightPaths = true;
} else {
for (OptimizerNode brancher : this.hereJoinedBranches) {
PlanNode candAtBrancher = in2.getSource().getCandidateAtBranchPoint(brancher);
// not all candidates are found, because this list includes joined branched from both regular inputs and broadcast vars
if (candAtBrancher == null) {
continue;
}
SourceAndDamReport res = in2.getSource().hasDamOnPathDownTo(candAtBrancher);
if (res == NOT_FOUND) {
throw new CompilerException("Bug: Tracing dams for deadlock detection is broken.");
} else if (res == FOUND_SOURCE) {
damOnAllRightPaths = false;
} else if (res == FOUND_SOURCE_AND_DAM) {