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

    https://github.com/apache/drill/pull/147#discussion_r39662237
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/ExternalSortBatch.java
 ---
    @@ -514,13 +516,20 @@ public BatchGroup 
mergeAndSpill(LinkedList<BatchGroup> batchGroups) throws Schem
             outputContainer.setRecordCount(count);
             newGroup.addBatch(outputContainer);
           }
    +      injector.injectChecked(context.getExecutionControls(), 
INTERRUPTION_WHILE_SPILLING, IOException.class);
           newGroup.closeOutputStream();
    -      for (BatchGroup group : batchGroupList) {
    -        group.cleanup();
    -      }
    -      hyperBatch.clear();
    +      threw = false;
    --- End diff --
    
    I think there is an implicit assumption here that threw = false;  statement 
will be the last statement in the try {} block.  Is that right ?  If so, that 
could be prone to some future problems if new code gets added here. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to