Github user vrozov commented on a diff in the pull request: https://github.com/apache/drill/pull/1237#discussion_r184159218 --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/unorderedreceiver/UnorderedReceiverBatch.java --- @@ -153,8 +153,10 @@ private RawFragmentBatch getNextBatch() throws IOException { public IterOutcome next() { batchLoader.resetRecordCount(); stats.startProcessing(); + + RawFragmentBatch batch = null; try{ - RawFragmentBatch batch; + --- End diff -- create function `getNextNotEmptyBatch()` that calls `getNextBatch()` and either returns not empty batch or `null`.
---