justinli500 commented on code in PR #49855:
URL: https://github.com/apache/arrow/pull/49855#discussion_r3725729254


##########
cpp/src/parquet/file_reader.cc:
##########
@@ -247,9 +247,15 @@ class SerializedRowGroup : public RowGroupReader::Contents 
{
         ::arrow::bit_util::GetBit(prebuffered_column_chunks_bitmap_->data(), 
i)) {
       // PARQUET-1698: if read coalescing is enabled, read from pre-buffered
       // segments.
-      PARQUET_ASSIGN_OR_THROW(auto buffer, cached_source_->Read(col_range));
-      stream = std::make_shared<::arrow::io::BufferReader>(buffer);
-    } else {
+      auto buffer = cached_source_->Read(col_range);

Review Comment:
   Good point - I added `ReadIfCached` so we can tell a cache miss from a real 
error. We only fall back on a miss now, and I also added a test for the error 
case.



-- 
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