pitrou commented on a change in pull request #9995: URL: https://github.com/apache/arrow/pull/9995#discussion_r611831400
########## File path: cpp/src/arrow/filesystem/filesystem.cc ########## @@ -159,10 +161,11 @@ Future<std::vector<FileInfo>> FileSystem::GetFileInfoAsync( [paths](std::shared_ptr<FileSystem> self) { return self->GetFileInfo(paths); }); } -Future<std::vector<FileInfo>> FileSystem::GetFileInfoAsync(const FileSelector& select) { - return FileSystemDefer( +FileInfoGenerator FileSystem::GetFileInfoGenerator(const FileSelector& select) { Review comment: Yes, you don't want to pay the cost of a function call and future unwrap for each `FileInfo` (imagine a situation where there are 10000 files). -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org