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

[jira] [Resolved] (ORC-836) StringGroupFromDoubleTreeReader Use Double toString

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

Dongjoon Hyun resolved ORC-836.
-------------------------------
    Fix Version/s: 1.8.0
       Resolution: Fixed

This is resolved via https://github.com/apache/orc/pull/740

> StringGroupFromDoubleTreeReader Use Double toString
> ---------------------------------------------------
>
>                 Key: ORC-836
>                 URL: https://issues.apache.org/jira/browse/ORC-836
>             Project: ORC
>          Issue Type: Improvement
>            Reporter: David Mollitor
>            Assignee: David Mollitor
>            Priority: Minor
>             Fix For: 1.8.0
>
>
> https://github.com/apache/orc/blob/fb0ed31f15d9b77b76bc5dec8721f5d9ee129879/java/core/src/java/org/apache/orc/impl/ConvertTreeReaderFactory.java#L1104-L1106
> {code:java}
>       if (!Double.isNaN(doubleValue)) {
>         String string = String.valueOf(doubleValue);
>         byte[] bytes = string.getBytes(StandardCharsets.UTF_8);
>         assignStringGroupVectorEntry(bytesColVector, elementNum, readerType, bytes);
>       }
> {code}
> {{String.valueOf}} simply calls {{Double.toString()}}, so just skip the jumps and call {{Double.toString()}} directly.
>  Also, does not need to be {{UTF_8}}.  Will only ever be ASCI values.



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