mapleFU commented on code in PR #39337:
URL: https://github.com/apache/arrow/pull/39337#discussion_r1455253916
##########
cpp/src/parquet/metadata.cc:
##########
@@ -793,26 +793,29 @@ class FileMetaData::FileMetaDataImpl {
std::shared_ptr<FileMetaData> out(new FileMetaData());
out->impl_ = std::make_unique<FileMetaDataImpl>();
- out->impl_->metadata_ = std::make_unique<format::FileMetaData>();
-
- auto metadata = out->impl_->metadata_.get();
- metadata->version = metadata_->version;
- metadata->schema = metadata_->schema;
+ {
+ // GH-39336: Copy the metadata, but only the row groups we need.
+ auto temp_row_groups = std::move(this->metadata_->row_groups);
Review Comment:
You're right, the thread-safety is a problem here. Maybe keeping the current
code is ok
--
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]