SteNicholas commented on code in PR #209:
URL: https://github.com/apache/paimon-cpp/pull/209#discussion_r3809798641


##########
src/paimon/format/parquet/parquet_file_batch_reader.cpp:
##########
@@ -635,14 +635,18 @@ Result<std::vector<std::pair<uint64_t, uint64_t>>> 
ParquetFileBatchReader::GenRe
     
PAIMON_PARQUET_CATCH_AND_RETURN_STATUS("ParquetFileBatchReader::GenReadRanges")
 }
 
+Result<std::vector<std::pair<uint64_t, uint64_t>>> 
ParquetFileBatchReader::PreBufferRange() {
+    return reader_->GetPreBufferRanges();
+}
+
 Result<::parquet::ReaderProperties> 
ParquetFileBatchReader::CreateReaderProperties(
     const std::shared_ptr<arrow::MemoryPool>& pool,
     const std::map<std::string, std::string>& options) {
     ::parquet::ReaderProperties reader_properties;
     // TODO(jinli.zjw): set more ReaderProperties (compare with java)
     PAIMON_ASSIGN_OR_RAISE(
         bool enable_pre_buffer,
-        OptionsUtils::GetValueFromMap<bool>(options, 
PARQUET_READ_ENABLE_PRE_BUFFER, true));
+        OptionsUtils::GetValueFromMap<bool>(options, 
PARQUET_READ_ENABLE_PRE_BUFFER, false));

Review Comment:
   Preserve prebuffering when the shared cache is inactive. This globally 
changes Parquet's prebuffer default to `false`, but `ReadContext` defaults 
`EnablePrefetch` to `false`, so ordinary scans never construct the shared cache 
and now have no prefetch layer. The same regression occurs with 
`PrefetchCacheMode::NEVER` and excluded predicate/bitmap modes. Please keep 
Arrow prebuffering enabled unless the shared cache will actually be initialized.



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