cyb70289 commented on code in PR #33739:
URL: https://github.com/apache/arrow/pull/33739#discussion_r1082323239
##########
cpp/src/parquet/arrow/writer.cc:
##########
@@ -291,8 +291,13 @@ class FileWriterImpl : public FileWriter {
arrow_properties_(std::move(arrow_properties)),
closed_(false) {
if (arrow_properties_->use_threads()) {
- parallel_column_write_contexts_.resize(schema_->num_fields(),
- {pool, arrow_properties_.get()});
Review Comment:
Indeed, for `vector.resize()`, all vector elements are copy constructed from
a single object [1], but `ArrowWriteContext` doesn't handle copying shared_ptr
data members [2].
I wonder if buffers in ArrowWriteContext supposed to be shared by multiple
instances. If not, we can use unique_ptr.
[1] https://godbolt.org/z/h7o3eW378
[2]
https://github.com/apache/arrow/blob/master/cpp/src/parquet/properties.h#L957
--
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]