mapleFU commented on code in PR #33656:
URL: https://github.com/apache/arrow/pull/33656#discussion_r1070244888
##########
cpp/src/parquet/arrow/writer.cc:
##########
@@ -333,7 +340,7 @@ class FileWriterImpl : public FileWriter {
std::unique_ptr<ArrowColumnWriterV2> writer,
ArrowColumnWriterV2::Make(*data, offset, size, schema_manifest_,
row_group_writer_));
- return writer->Write(&column_write_context_);
+ return writer->Write(&column_write_context_.back());
Review Comment:
Would a writer doesn't have any columns?
##########
cpp/src/parquet/arrow/writer.cc:
##########
@@ -403,17 +410,31 @@ class FileWriterImpl : public FileWriter {
}
auto WriteBatch = [&](int64_t offset, int64_t size) {
+ std::vector<std::unique_ptr<ArrowColumnWriterV2>> writers;
+
int column_index_start = 0;
for (int i = 0; i < batch.num_columns(); i++) {
- ChunkedArray chunkedArray(batch.column(i));
+ ChunkedArray chunkedArray{batch.column(i)};
Review Comment:
Here would `chunkedArray` dtor in stack because it outlives writer's
lifetime?
--
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]