alamb commented on code in PR #9207:
URL: https://github.com/apache/arrow-datafusion/pull/9207#discussion_r1489284976


##########
datafusion/core/src/datasource/listing/url.rs:
##########
@@ -189,28 +189,33 @@ impl ListingTableUrl {
 
     /// Returns `true` if `path` matches this [`ListingTableUrl`]
     pub fn contains(&self, path: &Path, ignore_subdirectory: bool) -> bool {
-        match self.strip_prefix(path) {
-            Some(mut segments) => match &self.glob {
-                Some(glob) => {
-                    if ignore_subdirectory {
-                        segments
-                            .next()
-                            .map_or(false, |file_name| glob.matches(file_name))
-                    } else {
-                        let stripped = segments.join("/");
-                        glob.matches(&stripped)
-                    }
+        let Some(all_segments) = self.strip_prefix(path) else {
+            return false;
+        };
+
+        // remove any segments that contain `=` as they are allowed even
+        // when ignore subdirectories is `true`

Review Comment:
   ```suggestion
           // when ignore subdirectories is `true`.
           // For example  a directory like `"year=2024"` is a hive
           // partition containing data for the year 2024.
   ```



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

Reply via email to