Github user Ben-Zvi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1227#discussion_r182929294
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchMemoryManager.java
 ---
    @@ -188,12 +196,18 @@ public int getOutgoingRowWidth() {
       public void setRecordBatchSizer(int index, RecordBatchSizer sizer) {
         Preconditions.checkArgument(index >= 0 && index < numInputs);
         this.sizer[index] = sizer;
    -    inputBatchStats[index] = new BatchStats();
    +    if (inputBatchStats[index] == null) {
    +      inputBatchStats[index] = new BatchStats();
    +    }
    +    updateIncomingStats(index);
       }
     
       public void setRecordBatchSizer(RecordBatchSizer sizer) {
    --- End diff --
    
    Can instead just call the above method with DEFAULT_INPUT_INDEX as the 
first parameter. 


---

Reply via email to