yadavay-amzn commented on code in PR #818:
URL: https://github.com/apache/iceberg-cpp/pull/818#discussion_r3531376738


##########
src/iceberg/arrow/arrow_io.cc:
##########
@@ -484,24 +485,52 @@ class ArrowOutputFile : public OutputFile {
 }  // namespace
 
 Result<std::string> ArrowFileSystemFileIO::ResolvePath(const std::string& 
file_location) {
-  const auto pos = file_location.find("://");
-  if (pos == std::string::npos) {
-    return file_location;
+  // Detect whether the location is a URI by looking for a scheme component.
+  // See iceberg/util/uri.h for the RFC 3986 scheme grammar.
+  bool is_uri = IsUriScheme(file_location);
+
+  if (!is_uri) {
+    return file_location;  // Bare local path (Unix or Windows drive letter)
+  }
+
+  auto colon_pos = file_location.find(':');

Review Comment:
   Done - IsUriScheme now takes an optional std::size_t* scheme_colon_pos 
out-param, and both ResolvePath here and DetectBuiltinFileIO in rest_file_io.cc 
reuse it instead of calling find(':') again.



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