mutexed commented on issue #39964:
URL: https://github.com/apache/arrow/issues/39964#issuecomment-1931924027
Hello, I understood that this is the issue of lifetime of pointer. I changed
my func declaration to this:
```c++
arrow::Status GetReader(
const std::string& location,
std::unique_ptr<parquet::arrow::FileReader>* arrow_reader,
std::shared_ptr<arrow::RecordBatchReader>* rb_reader,
const size_t batch_size = 64 * 1024);
```
The secret is to declare
```c++
std::unique_ptr<parquet::arrow::FileReader> arrow_reader;
std::shared_ptr<arrow::RecordBatchReader> rb_reader;
```
out of scope of GetReader (in the top scope) and it works now as expected.
--
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]