pitrou commented on code in PR #39164:
URL: https://github.com/apache/arrow/pull/39164#discussion_r1426718017
##########
cpp/src/arrow/ipc/read_write_test.cc:
##########
@@ -1334,7 +1334,7 @@ struct StreamDecoderWriterHelper : public
StreamWriterHelper {
Status ReadBatches(const IpcReadOptions& options, RecordBatchVector*
out_batches,
ReadStats* out_stats = nullptr,
MetadataVector* out_metadata_list = nullptr) override {
- auto listener = std::make_shared<CollectListener>();
+ auto listener = std::make_shared<CollectListener>(true);
Review Comment:
Also, why do we set it to true here? Can you add a comment?
##########
cpp/src/arrow/ipc/reader.h:
##########
@@ -317,7 +317,12 @@ class ARROW_EXPORT Listener {
/// \since 0.17.0
class ARROW_EXPORT CollectListener : public Listener {
public:
- CollectListener() : schema_(), filtered_schema_(), record_batches_(),
metadatas_() {}
+ explicit CollectListener(bool copy_record_batch = false)
Review Comment:
I don't understand why this is needed. Can you elaborate?
##########
cpp/src/arrow/ipc/read_write_test.cc:
##########
@@ -1334,7 +1334,7 @@ struct StreamDecoderWriterHelper : public
StreamWriterHelper {
Status ReadBatches(const IpcReadOptions& options, RecordBatchVector*
out_batches,
ReadStats* out_stats = nullptr,
MetadataVector* out_metadata_list = nullptr) override {
- auto listener = std::make_shared<CollectListener>();
+ auto listener = std::make_shared<CollectListener>(true);
Review Comment:
Please mention the parameter name
```suggestion
auto listener = std::make_shared<CollectListener>(/*xxx=*/ true);
```
--
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]