Copilot commented on code in PR #50044:
URL: https://github.com/apache/arrow/pull/50044#discussion_r3415349138
##########
cpp/src/arrow/filesystem/s3fs.h:
##########
@@ -290,6 +291,23 @@ struct ARROW_EXPORT S3Options {
std::string* out_path = NULLPTR);
static Result<S3Options> FromUri(const std::string& uri,
std::string* out_path = NULLPTR);
+
+ /// Equivalent to FromUri() with specific backend options that can't be
represented
+ /// on the URI or are better kept out of it (such as credentials).
+ /// Each option is a (name, value) pair. Recognized keys:
+ /// - "access_key" (std::string)
+ /// - "secret_key" (std::string)
+ /// - "session_token" (std::string)
+ /// - "retry_strategy" (std::shared_ptr<S3RetryStrategy>)
+ /// - "default_metadata" (std::shared_ptr<const KeyValueMetadata>)
+ /// Options appearing both in the URI and in the options map return
Status::Invalid;
+ /// unknown keys or invalid values return Status::Invalid.
Review Comment:
The docstring refers to an “options map”, but `FileSystemFactoryOptions` is
defined as a list/vector of (key, value) pairs. This is confusing for API users
(and makes it unclear whether duplicates are allowed). Update the wording to
“options list” (or similar).
##########
cpp/src/arrow/filesystem/filesystem.h:
##########
@@ -547,6 +580,30 @@ ARROW_EXPORT
Result<std::shared_ptr<FileSystem>> FileSystemFromUri(const std::string& uri,
std::string* out_path =
NULLPTR);
+/// \brief Create a new FileSystem by URI with extended backend-specific
filesystem
+/// options
+///
+/// Recognized schemes are "file", "mock", "hdfs", "viewfs", "s3",
+/// "gs" and "gcs".
Review Comment:
The “Recognized schemes” list in this doc block omits schemes that
`FileSystemFromUri*` actually supports (e.g. "abfs"/"abfss" are handled in
`FileSystemFromUriReal`). Please update the documentation to include them so
API users don’t assume they’re unsupported.
##########
cpp/src/arrow/filesystem/filesystem.h:
##########
@@ -563,6 +620,31 @@ Result<std::shared_ptr<FileSystem>>
FileSystemFromUri(const std::string& uri,
const io::IOContext&
io_context,
std::string* out_path =
NULLPTR);
+/// \brief Create a new FileSystem by URI with a custom IO context with
backend-specific
+/// filesystem options
+///
+/// Recognized schemes are "file", "mock", "hdfs", "viewfs", "s3",
+/// "gs" and "gcs".
Review Comment:
Same as above: the “Recognized schemes” list for the IOContext overloads
omits "abfs"/"abfss" even though the implementation supports them. Please
update this doc block as well for consistency and accuracy.
--
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]