You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Panagiotis Garefalakis (Jira)" <ji...@apache.org> on 2021/07/18 12:26:00 UTC

[jira] [Resolved] (ORC-847) Do Not Create Empty Array in StringGroupFromBinaryTreeReader

     [ https://issues.apache.org/jira/browse/ORC-847?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Panagiotis Garefalakis resolved ORC-847.
----------------------------------------
    Resolution: Fixed

> Do Not Create Empty Array in StringGroupFromBinaryTreeReader
> ------------------------------------------------------------
>
>                 Key: ORC-847
>                 URL: https://issues.apache.org/jira/browse/ORC-847
>             Project: ORC
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>             Fix For: 1.8.0
>
>
> {code:java|title=StringGroupFromBinaryTreeReader.java}
>     @Override
>     public void setConvertVectorElement(int elementNum) throws IOException {
>       byte[] bytes = inBytesColVector.vector[elementNum];
>       int start = inBytesColVector.start[elementNum];
>       int length = inBytesColVector.length[elementNum];
>       // Use an static empty array instead of creating a zero-length array
>       byte[] string = new byte[length == 0 ? 0 : 3 * length - 1];
> {code}



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