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

Daniel Weeks updated PARQUET-75:
--------------------------------

    Description: 
There are three implementations of the Binary class and only one is using the 
faster 'UTF8.decode' in the 'toStringUsingUTF8' method.  This fixes them to all 
use the faster UTF8.decode.   

As noted in the comments, the 'new String' approach creates a new decoder each 
time, which is slower than the cached instance used by 'UTF8.decode'.

#1. ByteArraySliceBackedBinary   <-- UTF8.decode
#2. ByteArrayBackedBinary  <-- new String
#3. ByteBufferBackedBinary <-- new String

https://github.com/apache/incubator-parquet-mr/pull/40

  was:
There are three implementations of the Binary class and only one is using the 
faster 'UTF8.decode' in the 'toStringUsingUTF8' method.  This fixes them to all 
use the faster UTF8.decode.   

As noted in the comments, the 'new String' approach creates a new decoder each 
time, which is slower than the cached instance used by 'UTF8.decode'.

#1. ByteArraySliceBackedBinary   <-- UTF8.decode
#2. ByteArrayBackedBinary  <-- new String
#3. ByteBufferBackedBinary <-- new String


> String decode using 'new String' is slow
> ----------------------------------------
>
>                 Key: PARQUET-75
>                 URL: https://issues.apache.org/jira/browse/PARQUET-75
>             Project: Parquet
>          Issue Type: Bug
>          Components: parquet-mr
>            Reporter: Daniel Weeks
>            Assignee: Daniel Weeks
>
> There are three implementations of the Binary class and only one is using the 
> faster 'UTF8.decode' in the 'toStringUsingUTF8' method.  This fixes them to 
> all use the faster UTF8.decode.   
> As noted in the comments, the 'new String' approach creates a new decoder 
> each time, which is slower than the cached instance used by 'UTF8.decode'.
> #1. ByteArraySliceBackedBinary   <-- UTF8.decode
> #2. ByteArrayBackedBinary  <-- new String
> #3. ByteBufferBackedBinary <-- new String
> https://github.com/apache/incubator-parquet-mr/pull/40



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to