Github user vrozov commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1237#discussion_r184589826
  
    --- 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 --
    
    OK, but note that additions to the current code can also delete `batch = 
null` assignment and that `batch` can be used after `release()` call. For 
example, with the current implementation, `batch.getHeader()` is perfectly 
valid after the batch was released.


---

Reply via email to