[ 
https://issues.apache.org/jira/browse/HIVE-25190?focusedWorklogId=612210&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-612210
 ]

ASF GitHub Bot logged work on HIVE-25190:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 18/Jun/21 23:46
            Start Date: 18/Jun/21 23:46
    Worklog Time Spent: 10m 
      Work Description: omalley opened a new pull request #2408:
URL: https://github.com/apache/hive/pull/2408


   
   ### What changes were proposed in this pull request?
   
   This change fixes BytesColumnVector so that it will not try to increase the 
small item buffer to be larger than 1gb. Any allocations after that will use 
individual buffers.
   
   It also adds new tests to verify the changed behavior. Since the new test 
needs to allocate more than 1gb of data, I needed to bump up the test memory 
from 2 to 3gb.
   
   I also restructured the internal details of the BytesColumnVector and the 
way that the small value buffer is managed. Now, the fields buffer and nextFree 
are only used to store the location of the current value allocation. The long 
term buffer is always stored in smallBuffer and smallBufferNextFree. (It 
previously had moved back and forth between the two sets of variables depending 
on context.)
   
   ### Why are the changes needed?
   
   Users are hitting the exception when the small value buffer crosses over 1gb.
   
   ### Does this PR introduce _any_ user-facing change?
   
   It removes the public method BytesColumnVector.increaseBufferSpace, which 
was only called from within storage-api. Users should use the more popular 
ensureValPreallocated method, which is increaseBufferSpace with a check to see 
if the increase is necessary.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some 
test cases that check the changes thoroughly including negative and positive 
cases if possible.
   If it was tested in a way different from regular unit tests, please clarify 
how you tested step by step, ideally copy and paste-able, so that other 
reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why 
it was difficult to add.
   -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

            Worklog Id:     (was: 612210)
    Remaining Estimate: 0h
            Time Spent: 10m

> BytesColumnVector fails when the aggregate size is > 1gb
> --------------------------------------------------------
>
>                 Key: HIVE-25190
>                 URL: https://issues.apache.org/jira/browse/HIVE-25190
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Owen O'Malley
>            Assignee: Owen O'Malley
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently, BytesColumnVector will allocate a buffer for small values (< 1mb), 
> but fail with:
> {code:java}
> new RuntimeException("Overflow of newLength. smallBuffer.length="
>                 + smallBuffer.length + ", nextElemLength=" + nextElemLength);
> {code:java}
> if the aggregate size of the buffer crosses over 1gb. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to