You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wjones127 (via GitHub)" <gi...@apache.org> on 2023/05/08 21:48:11 UTC

[GitHub] [arrow] wjones127 commented on a diff in pull request #35368: GH-34722: [C++][Parquet] Minor: Update wording of Parquet NextPage

wjones127 commented on code in PR #35368:
URL: https://github.com/apache/arrow/pull/35368#discussion_r1187923808


##########
cpp/src/parquet/column_reader.cc:
##########
@@ -275,6 +275,10 @@ class SerializedPageReader : public PageReader {
   }
 
   // Implement the PageReader interface
+  //
+  // SerializedPageReader reuses same decryption buffer and decompression buffer
+  // internal, so, if NextPage() is called, content of previous page might be
+  // invalidated.

Review Comment:
   ```suggestion
     // The returned Page contains references that aren't guaranteed to live
     // beyond the next call to NextPage(). SerializedPageReader reuses the 
     // decryption and decompression buffers internally, so if NextPage() is 
     // called then the content of previous page might be invalidated.
   ```



##########
cpp/src/parquet/column_reader.h:
##########
@@ -152,6 +152,10 @@ class PARQUET_EXPORT PageReader {
 
   // @returns: shared_ptr<Page>(nullptr) on EOS, std::shared_ptr<Page>
   // containing new Page otherwise
+  //
+  // In PageReader, it may reuse same underlying buffer, so, if
+  // NextPage() is called, content of previous page might be
+  // invalidated.

Review Comment:
   ```suggestion
     // The returned Page may contain references that aren't guaranteed to live
     // beyond the next call to NextPage().
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org