Guosmilesmile commented on code in PR #13429:
URL: https://github.com/apache/iceberg/pull/13429#discussion_r2178891218


##########
core/src/test/java/org/apache/iceberg/util/TestFileSystemWalker.java:
##########
@@ -135,4 +158,33 @@ public void testListDirRecursivelyWithFileIO() {
     assertThat(foundFiles)
         .contains(Paths.get("file://", basePath, 
"normal_dir/dep1/file3.txt").toString());
   }
+
+  @Test
+  public void testPartitionAwareHiddenPathFilter() throws IOException {
+    Schema schema =
+        new Schema(
+            Types.NestedField.required(1, "id", Types.IntegerType.get()),
+            Types.NestedField.required(2, "_hidden_field", 
Types.StringType.get()));
+    PartitionSpec spec = 
PartitionSpec.builderFor(schema).identity("_hidden_field").build();
+    Map<Integer, PartitionSpec> partitionSpecs = ImmutableMap.of(0, spec);
+
+    Path partitionDir = Paths.get(basePath, "_hidden_field=value");
+    Files.createDirectories(partitionDir);
+    Path fileInPartition = partitionDir.resolve("file4.txt");
+    Files.createFile(fileInPartition);
+
+    Path partitionDir1 = Paths.get(basePath, "_show_field=value");
+    Files.createDirectories(partitionDir1);
+    Path fileInPartition1 = partitionDir1.resolve("file5.txt");
+    Files.createFile(fileInPartition1);
+
+    List<String> foundFiles = Lists.newArrayList();
+    Predicate<FileInfo> fileFilter = fileInfo -> 
fileInfo.location().endsWith(".txt");
+    FileSystemWalker.listDirRecursivelyWithFileIO(

Review Comment:
   Ok, I have change it.



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