mapleFU commented on code in PR #37918:
URL: https://github.com/apache/arrow/pull/37918#discussion_r1339703466


##########
cpp/src/arrow/dataset/file_base.cc:
##########
@@ -81,6 +81,18 @@ Result<std::shared_ptr<io::RandomAccessFile>> 
FileSource::Open() const {
   return custom_open_();
 }
 
+Future<std::shared_ptr<io::RandomAccessFile>> FileSource::OpenAsync() const {
+  if (filesystem_) {
+    return filesystem_->OpenInputFileAsync(file_info_);
+  }
+  
+  if (buffer_) {
+    return 
Future<std::shared_ptr<io::RandomAccessFile>>::MakeFinished(std::make_shared<io::BufferReader>(buffer_));
+  }
+
+  return 
Future<std::shared_ptr<io::RandomAccessFile>>::MakeFinished(custom_open_());

Review Comment:
   You can leave a comment here, and keep it here? I think at lease, open via 
fileSystem could be help, and `custom_open_` won't be worse



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