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

    https://github.com/apache/drill/pull/1025#discussion_r150329246
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/mergereceiver/MergingRecordBatch.java
 ---
    @@ -795,6 +788,8 @@ private void generateComparisons(final 
ClassGenerator<?> g, final VectorAccessib
        * @param node Reference to the next record to copy from the incoming 
batches
        */
       private boolean copyRecordToOutgoingBatch(final Node node) {
    +    assert outgoingPosition < OUTGOING_BATCH_SIZE
    --- End diff --
    
    Doing this assert check on each record would add some overhead.  Since the 
caller already is checking outgoingBatchHasSpace in the while loop, this check 
is not needed.  You could add a javadoc comment that caller is expected to do 
the validity check. 


---

Reply via email to