[ 
https://issues.apache.org/jira/browse/DRILL-3874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14940689#comment-14940689
 ] 

ASF GitHub Bot commented on DRILL-3874:
---------------------------------------

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

    https://github.com/apache/drill/pull/181#discussion_r40985372
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/vector/complex/BaseRepeatedValueVector.java
 ---
    @@ -123,6 +123,15 @@ public int getBufferSize() {
       }
     
       @Override
    +  public int getBufferSizeFor(int valueCount) {
    +    if (getAccessor().getValueCount() == 0) {
    +      return 0;
    +    }
    +
    +    return offsets.getBufferSizeFor(valueCount) + 
vector.getBufferSizeFor(valueCount);
    --- End diff --
    
    Based on setInitialValueCapacity(), I think you're right. Will do. (But I'm 
not going to go back and patch the EBF for that, because it'll just be off by 
one offsets value, or 4 bytes, which isn't going to kill the emergency fix.)


> flattening large JSON objects consumes too much direct memory
> -------------------------------------------------------------
>
>                 Key: DRILL-3874
>                 URL: https://issues.apache.org/jira/browse/DRILL-3874
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.1.0
>            Reporter: Chris Westin
>            Assignee: Chris Westin
>
> A JSON record has a field whose value is an array with 20,000 elements; the 
> record's size is 4MB. A select is used to flatten this. The query profile 
> reports that the peak memory utilization was 8GB, most of it used by the 
> flatten. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to