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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to