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


##########
cpp/src/arrow/dataset/scanner.cc:
##########
@@ -85,6 +92,15 @@ class ScannerRecordBatchReader : public RecordBatchReader {
     return Status::OK();
   }
 
+  Status Close() override {
+    std::shared_ptr<RecordBatch> batch;
+    RETURN_NOT_OK(ReadNext(&batch));
+    while (batch != nullptr) {
+      RETURN_NOT_OK(ReadNext(&batch));
+    }
+    return Status::OK();

Review Comment:
   That seems a little heavyweight.  I think most of our record batch readers 
can safely abandon a read partway through.



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