Github user sachouche commented on a diff in the pull request:
https://github.com/apache/drill/pull/1237#discussion_r184726839
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/unorderedreceiver/UnorderedReceiverBatch.java
---
@@ -201,6 +208,11 @@ public IterOutcome next() {
context.getExecutorState().fail(ex);
return IterOutcome.STOP;
} finally {
+
+ if (batch != null) {
+ batch.release();
+ batch = null;
--- End diff --
The point of this pattern is that if you would like to continue using this
object then be prepared to know what can and what cannot be used.
---