wgtmac commented on code in PR #889:
URL: https://github.com/apache/iceberg-cpp/pull/889#discussion_r3811125628


##########
src/iceberg/resolving_file_io.cc:
##########
@@ -32,33 +35,22 @@ 
ResolvingFileIO::ResolvingFileIO(std::unordered_map<std::string, std::string> pr
 
 ResolvingFileIO::~ResolvingFileIO() = default;
 
-Result<std::string_view> ResolveFileIOName(std::string_view location) {
-  const auto pos = location.find("://");
-  if (pos == std::string_view::npos) {
-    return FileIORegistry::kArrowLocalFileIO;
-  }
+Result<std::shared_ptr<FileIO>> ResolvingFileIO::FileIOForPath(
+    std::string_view location) {
+  const auto scheme = 
StringUtils::ToLower(LocationUtil::ParseScheme(location));
+  ICEBERG_ASSIGN_OR_RAISE(const auto name, FileIORegistry::Resolve(scheme));

Review Comment:
   I think the contract is that FileIO registration should be done before 
anything. A created ResolvingFileIO should just use its cached instances to 
serve followup calls.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to