MisterRaindrop commented on code in PR #889:
URL: https://github.com/apache/iceberg-cpp/pull/889#discussion_r3810802352
##########
src/iceberg/arrow/s3/arrow_s3_file_io.cc:
##########
@@ -91,11 +91,10 @@ std::string SplitEndpointScheme(std::string_view endpoint,
return std::string(endpoint);
}
-// Location prefixes this FileIO can serve: must cover every scheme
-// ResolveFileIOName routes here, or such a credential would be dropped.
+// Location prefixes this FileIO can serve.
bool IsS3FileIOCredentialPrefix(std::string_view prefix) {
return prefix == "s3" || prefix.starts_with("s3://") ||
prefix.starts_with("s3a://") ||
- prefix.starts_with("s3n://") || prefix.starts_with("oss://");
+ prefix.starts_with("s3n://");
Review Comment:
"macro" was not the right term. I feel moving this logic to kS3Schemes in
s3_properties.h looks better
like this
```
inline bool IsS3CredentialPrefix(std::string_view prefix) {
if (prefix == S3Properties::kS3Schema) {
return true;
}
const auto delimiter = prefix.find("://");
return delimiter != std::string_view::npos &&
IsS3Scheme(prefix.substr(0, delimiter));
}
```
--
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]