You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@orc.apache.org by "David Mollitor (Jira)" <ji...@apache.org> on 2021/07/14 01:46:00 UTC

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

David Mollitor created ORC-847:
----------------------------------

             Summary: 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


{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)