Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/1059#discussion_r158593969
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/record/AbstractBinaryRecordBatch.java
---
@@ -65,11 +65,18 @@ protected boolean prefetchFirstBatchFromBothSides() {
return false;
}
- if (leftUpstream == IterOutcome.NONE && rightUpstream ==
IterOutcome.NONE) {
+ if (checkForEarlyFinish()) {
state = BatchState.DONE;
return false;
}
return true;
}
+
+ /*
+ * Checks for the operator specific early terminal condition.
+ * @return true if the further processing can stop.
+ * false if the further processing is needed.
+ */
+ protected abstract boolean checkForEarlyFinish();
--- End diff --
This is abstract, But, all implementations are identical. Can't we just
move the implementation here?
---