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

    https://github.com/apache/drill/pull/1125#discussion_r171999276
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/record/RecordBatchSizer.java 
---
    @@ -245,16 +251,30 @@ private void buildVectorInitializer(VectorInitializer 
initializer) {
           else if (width > 0) {
             initializer.variableWidth(name, width);
           }
    +
    +      for (ColumnSize columnSize : childColumnSizes.values()) {
    +        columnSize.buildVectorInitializer(initializer);
    +      }
         }
    +
       }
     
       public static ColumnSize getColumn(ValueVector v, String prefix) {
         return new ColumnSize(v, prefix);
       }
     
    +  public ColumnSize getColumn(String name) {
    +    return allColumnSizes.get(name);
    +  }
    +
       public static final int MAX_VECTOR_SIZE = ValueVector.MAX_BUFFER_SIZE; 
// 16 MiB
     
    -  private Map<String, ColumnSize> columnSizes = 
CaseInsensitiveMap.newHashMap();
    +  // This keeps information for all columns i.e. all top columns and 
nested columns underneath
    +  private Map<String, ColumnSize> allColumnSizes = 
CaseInsensitiveMap.newHashMap();
    --- End diff --
    
    yes, I got rid of allColumnSizes. We will have only top level columns.


---

Reply via email to