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


##########
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:
   👍 left a todo



##########
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:
   👍 left a todo



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