You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@parquet.apache.org by we...@apache.org on 2016/06/25 00:15:27 UTC

parquet-cpp git commit: PARQUET-641: Instantiate stringstream only if needed in SerializedPageReader::NextPage

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 <uw...@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 <uw...@xhochy.com>
Authored: Fri Jun 24 17:09:07 2016 -0700
Committer: Wes McKinney <we...@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_) {