pitrou commented on a change in pull request #8187:
URL: https://github.com/apache/arrow/pull/8187#discussion_r488777111



##########
File path: cpp/src/arrow/filesystem/filesystem.cc
##########
@@ -448,6 +449,13 @@ Status CopyFiles(const std::vector<FileLocator>& sources,
                            destinations.size(), " paths.");
   }
 
+  RETURN_NOT_OK(::arrow::internal::OptionalParallelFor(
+      use_threads, static_cast<int>(sources.size()), [&](int i) {
+        auto dest_dir = 
internal::GetAbstractPathParent(destinations[i].path).first;
+        return dest_dir.empty() ? Status::OK()
+                                : 
destinations[i].filesystem->CreateDir(dest_dir);

Review comment:
       Yes, this doesn't look terrific at all, especially on a remote 
filesystem. Why do you need to create target directories on the fly at all? 
That doesn't seem very useful, nor idiomatic.
   




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


Reply via email to