westonpace commented on code in PR #12625:
URL: https://github.com/apache/arrow/pull/12625#discussion_r862196550
##########
cpp/src/arrow/filesystem/path_util.cc:
##########
@@ -287,6 +288,38 @@ bool IsLikelyUri(util::string_view v) {
return ::arrow::internal::IsValidUriScheme(v.substr(0, pos));
}
+struct Globber::Impl {
+ std::regex pattern_;
+
+ explicit Impl(std::string p) : pattern_(std::regex(std::move(transform(p))))
{}
+
+ std::string transform(std::string p) {
Review Comment:
Well, the burden of escaping the path would initially be on the user. For
example, in S3 I could have the following paths:
```
weston-my-bucket/*/0.parquet
weston-my-bucket/*/1.parquet
```
As a user I might pass in the glob URI: `s3://weston-my-bucket/\*/*.parquet`
We then need to make sure that the regex we generate is (I think):
`weston-my-bucket/\*/.*\.parquet`
--
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]