lidavidm commented on code in PR #13205:
URL: https://github.com/apache/arrow/pull/13205#discussion_r885543631


##########
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:
   We can move the definition to the `.cc` file, no?



-- 
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]

Reply via email to