[
https://issues.apache.org/jira/browse/DRILL-6234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy Farkas updated DRILL-6234:
----------------------------------
Description:
Doing the following will throw an Index out of bounds exception.
{code}
final VarCharVector vector = new VarCharVector(field, allocator);
vector.allocateNew();
vector.getMutator().setValueCount(100);
{code}
The expected behavior is to resize the array appropriately. If an index is
uninitialized you should not call get for that index.
was:
Doing the following will throw an Index out of bounds exception.
{code}
final VarCharVector vector = new VarCharVector(field, allocator);
vector.allocateNew();
vector.getMutator().setValueCount(100);
{code}
The expected behavior is to resize the array appropriately. If an index is
uninitialized it can return an empty byte array.
> VarCharVector setValueCount can throw IndexOutOfBoundsException
> ---------------------------------------------------------------
>
> Key: DRILL-6234
> URL: https://issues.apache.org/jira/browse/DRILL-6234
> Project: Apache Drill
> Issue Type: Improvement
> Reporter: Timothy Farkas
> Assignee: Timothy Farkas
> Priority: Major
>
> Doing the following will throw an Index out of bounds exception.
> {code}
> final VarCharVector vector = new VarCharVector(field, allocator);
> vector.allocateNew();
> vector.getMutator().setValueCount(100);
> {code}
> The expected behavior is to resize the array appropriately. If an index is
> uninitialized you should not call get for that index.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)