parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jul...@apache.org
Subject git commit: PARQUET-75: Fixed string decode performance issue
Date Thu, 28 Aug 2014 18:31:09 GMT
Repository: incubator-parquet-mr
Updated Branches:
  refs/heads/master 8474f6d81 -> d3cd97a8a


PARQUET-75: Fixed string decode performance issue

Switch to using 'UTF8.decode' as opposed to 'new String'

https://issues.apache.org/jira/browse/PARQUET-75

Author: Daniel Weeks <dweeks@netflix.com>

Closes #40 from dcw-netflix/string-decode and squashes the following commits:

2cf53e7 [Daniel Weeks] Fixed string decode performance issue


Project: http://git-wip-us.apache.org/repos/asf/incubator-parquet-mr/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-parquet-mr/commit/d3cd97a8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-parquet-mr/tree/d3cd97a8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-parquet-mr/diff/d3cd97a8

Branch: refs/heads/master
Commit: d3cd97a8ad7f1c1df48bf42080d993b861158786
Parents: 8474f6d
Author: Daniel Weeks <dweeks@netflix.com>
Authored: Thu Aug 28 11:30:50 2014 -0700
Committer: julien <julien@twitter.com>
Committed: Thu Aug 28 11:30:50 2014 -0700

----------------------------------------------------------------------
 parquet-column/src/main/java/parquet/io/api/Binary.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-parquet-mr/blob/d3cd97a8/parquet-column/src/main/java/parquet/io/api/Binary.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/io/api/Binary.java b/parquet-column/src/main/java/parquet/io/api/Binary.java
index 432f075..a297603 100644
--- a/parquet-column/src/main/java/parquet/io/api/Binary.java
+++ b/parquet-column/src/main/java/parquet/io/api/Binary.java
@@ -168,7 +168,7 @@ abstract public class Binary implements Comparable<Binary>, Serializable
{
 
     @Override
     public String toStringUsingUTF8() {
-      return new String(value, BytesUtils.UTF8);
+      return UTF8.decode(ByteBuffer.wrap(value)).toString();
     }
 
     @Override
@@ -236,7 +236,7 @@ abstract public class Binary implements Comparable<Binary>, Serializable
{
 
     @Override
     public String toStringUsingUTF8() {
-      return new String(getBytes(), BytesUtils.UTF8);
+      return UTF8.decode(value).toString();
     }
 
     @Override


Mime
View raw message