parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject parquet-cpp git commit: PARQUET-641: Instantiate stringstream only if needed in SerializedPageReader::NextPage
Date Sat, 25 Jun 2016 00:15:27 GMT
Repository: parquet-cpp
Updated Branches:
  refs/heads/master c6a3d270d -> 5e831d65d


PARQUET-641: Instantiate stringstream only if needed in SerializedPageReader::NextPage

Small change but still some visible impact.

Author: Uwe L. Korn <uwelk@xhochy.com>

Closes #126 from xhochy/parquet-641 and squashes the following commits:

9902b0e [Uwe L. Korn] PARQUET-641: Instantiate stringstream only if needed in SerializedPageReader::NextPage


Project: http://git-wip-us.apache.org/repos/asf/parquet-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/parquet-cpp/commit/5e831d65
Tree: http://git-wip-us.apache.org/repos/asf/parquet-cpp/tree/5e831d65
Diff: http://git-wip-us.apache.org/repos/asf/parquet-cpp/diff/5e831d65

Branch: refs/heads/master
Commit: 5e831d65da07be8bb7faa6f311be0110685fe7f8
Parents: c6a3d27
Author: Uwe L. Korn <uwelk@xhochy.com>
Authored: Fri Jun 24 17:09:07 2016 -0700
Committer: Wes McKinney <wesm@apache.org>
Committed: Fri Jun 24 17:09:07 2016 -0700

----------------------------------------------------------------------
 src/parquet/file/reader-internal.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/parquet-cpp/blob/5e831d65/src/parquet/file/reader-internal.cc
----------------------------------------------------------------------
diff --git a/src/parquet/file/reader-internal.cc b/src/parquet/file/reader-internal.cc
index 620421f..9e592b5 100644
--- a/src/parquet/file/reader-internal.cc
+++ b/src/parquet/file/reader-internal.cc
@@ -57,7 +57,6 @@ std::shared_ptr<Page> SerializedPageReader::NextPage() {
     uint32_t header_size = 0;
     const uint8_t* buffer;
     uint32_t allowed_page_size = DEFAULT_PAGE_HEADER_SIZE;
-    std::stringstream ss;
 
     // Page headers can be very large because of page statistics
     // We try to deserialize a larger buffer progressively
@@ -73,6 +72,7 @@ std::shared_ptr<Page> SerializedPageReader::NextPage() {
         break;
       } catch (std::exception& e) {
         // Failed to deserialize. Double the allowed page header size and try again
+        std::stringstream ss;
         ss << e.what();
         allowed_page_size *= 2;
         if (allowed_page_size > max_page_header_size_) {


Mime
View raw message