in wayang-commons/wayang-core/src/main/java/org/apache/wayang/core/plan/wayangplan/Operators.java [114:128]
public static void assertEqualOutputs(Operator o1, Operator o2) throws IllegalArgumentException {
if (o1.getNumOutputs() != o2.getNumOutputs()) {
throw new IllegalArgumentException(String.format("%s and %s have different numbers of outputs.", o1, o2));
}
for (int i = 0; i < o1.getNumOutputs(); i++) {
final OutputSlot<?> output1 = o1.getOutput(i);
final OutputSlot<?> output2 = o2.getOutput(i);
if ((output1 == null && output2 != null) ||
(output1 != null && output2 == null) ||
(output1 != null && output2 != null && !output1.getType().equals(output2.getType()))) {
throw new IllegalArgumentException("Operators differ in output " + i + ".");
}
}
}