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

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

GitHub user sohami opened a pull request:

    https://github.com/apache/drill/pull/1124

    DRILL-6172: setValueCount of VariableLengthVectors throws IOB excepti…

    …on when called with 0 value after clearing vectors

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/sohami/drill DRILL-6172

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/drill/pull/1124.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1124
    
----
commit 960374b5486fce17a19c7a5ed5200645b5c3ac63
Author: Sorabh Hamirwasia <shamirwasia@...>
Date:   2018-02-21T01:14:29Z

    DRILL-6172: setValueCount of VariableLengthVectors throws IOB exception 
when called with 0 value after clearing vectors

----


> setValueCount of VariableLengthVectors throws IOB exception when called with 
> 0 value after clearing vectors
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: DRILL-6172
>                 URL: https://issues.apache.org/jira/browse/DRILL-6172
>             Project: Apache Drill
>          Issue Type: Bug
>            Reporter: Sorabh Hamirwasia
>            Assignee: Sorabh Hamirwasia
>            Priority: Major
>             Fix For: 1.13.0
>
>
> For VariableLengthVectors when we call *setValueCount* explicitly after 
> clearing off the vector memory then it throws IOB exception. Normally 
> *setValueCount* is not required to be called explicitly after clear, since 
> getValueCount will return correct information. But if called it currently 
> throws IOB which should not be the case.
> The reason being when clear is called then it releases both offsetVector and 
> dataVector memory(or DrillByteBuf). Later when setValueCount is called then 
> it tries to get current value in offset vector at that valueCount index and 
> fails since the length of offset vector is zero. [Reference to 
> code|https://github.com/apache/drill/blob/master/exec/vector/src/main/codegen/templates/VariableLengthVectors.java#L703].



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to