diff --git a/cpp/src/arrow/dataset/file_base.cc b/cpp/src/arrow/dataset/file_base.cc index 824365c38755f..6a97b51cf2815 100644 --- a/cpp/src/arrow/dataset/file_base.cc +++ b/cpp/src/arrow/dataset/file_base.cc @@ -85,9 +85,10 @@ Future> FileSource::OpenAsync() const { if (filesystem_) { return filesystem_->OpenInputFileAsync(file_info_); } - + if (buffer_) { - return Future>::MakeFinished(std::make_shared(buffer_)); + return Future>::MakeFinished( + std::make_shared(buffer_)); } // TODO(GH-37962): custom_open_ should not block