lidavidm commented on code in PR #13205:
URL: https://github.com/apache/arrow/pull/13205#discussion_r882190050
##########
cpp/src/arrow/compute/exec/exec_plan.cc:
##########
@@ -464,6 +464,13 @@ std::shared_ptr<RecordBatchReader> MakeGeneratorReader(
std::shared_ptr<Schema> schema,
std::function<Future<util::optional<ExecBatch>>()> gen, MemoryPool* pool) {
struct Impl : RecordBatchReader {
+ ~Impl() {
+ auto st = this->Close();
+ if (!st.ok()) {
+ ARROW_LOG(WARNING) << "MakeGeneratorReader failed in finalzing
reading.";
+ }
Review Comment:
Agreed, this should just be the default. I would also make the message clear
that it's because Close() was not explicitly called, and include the status in
the message.
--
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]