pitrou commented on code in PR #40111:
URL: https://github.com/apache/arrow/pull/40111#discussion_r1494266065
##########
cpp/src/arrow/dataset/file_parquet.cc:
##########
@@ -779,6 +779,11 @@ ParquetFileFragment::ParquetFileFragment(FileSource source,
parquet_format_(checked_cast<ParquetFileFormat&>(*format_)),
row_groups_(std::move(row_groups)) {}
+const std::shared_ptr<parquet::FileMetaData>& ParquetFileFragment::metadata() {
+ auto lock = physical_schema_mutex_.Lock();
+ return metadata_;
Review Comment:
This is returning a reference to an internal member, but the dereferencing
won't be protected by the lock.
Should we switch to return a `std::shared_ptr` instead?
--
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]