jp0317 commented on code in PR #36649:
URL: https://github.com/apache/arrow/pull/36649#discussion_r1264725405
##########
cpp/src/parquet/file_reader.cc:
##########
@@ -366,9 +367,13 @@ class SerializedFile : public ParquetFileReader::Contents {
std::vector<::arrow::io::ReadRange> ranges;
prebuffered_column_chunks_.clear();
for (int row : row_groups) {
- std::unordered_set<int>& prebuffered = prebuffered_column_chunks_[row];
+ std::shared_ptr<Buffer>& col_bitmap = prebuffered_column_chunks_[row];
+ int num_cols = file_metadata_->num_columns();
+ PARQUET_THROW_NOT_OK(
+ AllocateBitmap(num_cols,
properties_.memory_pool()).Value(&col_bitmap));
+ ::arrow::bit_util::ClearBitmap(col_bitmap->mutable_data(), 0, num_cols);
Review Comment:
sure, changed to memset, thanks
##########
cpp/src/parquet/file_reader.cc:
##########
@@ -578,8 +583,9 @@ class SerializedFile : public ParquetFileReader::Contents {
ReaderProperties properties_;
std::shared_ptr<PageIndexReader> page_index_reader_;
std::unique_ptr<BloomFilterReader> bloom_filter_reader_;
- // Maps a row group to its column chunks that are cached via Prebuffer().
- std::unordered_map<int, std::unordered_set<int>> prebuffered_column_chunks_;
+ // Maps a row group to a bitmap (stored in the Buffer) that marks its column
chunks
+ // cached via Prebuffer().
Review Comment:
done ,thanks
--
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]