westonpace commented on code in PR #34420:
URL: https://github.com/apache/arrow/pull/34420#discussion_r1140207829


##########
cpp/src/arrow/filesystem/filesystem.cc:
##########
@@ -738,8 +738,57 @@ Result<std::shared_ptr<FileSystem>> 
FileSystemFromUriReal(const Uri& uri,
   return Status::Invalid("Unrecognized filesystem type in URI: ", uri_string);
 }
 
+Status CheckFileSystem(const FileSystem* filesystem,
+                       const std::string& expected_type_name, const 
std::string& uri) {
+  if (filesystem && filesystem->type_name() != expected_type_name) {
+    return Status::Invalid("URI ", uri, " is not compatible with filesystem of 
type ",
+                           filesystem->type_name());
+  }
+  return Status::OK();
+}
+
 }  // namespace
 
+Result<std::string> PathFromUriOrPath(const FileSystem* filesystem,

Review Comment:
   Ah, can't move the existing methods because you don't have a filesystem at 
that point.  I'll update this one to be a virtual method.



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