pvary commented on code in PR #13429: URL: https://github.com/apache/iceberg/pull/13429#discussion_r2177765740
########## 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: Could we make this test parametrized and run this with `listDirRecursivelyWithHadoop` too? Like: ``` @ParameterizedTest @ValueSource(booleans = {true, false}) public void testPartitionAwareHiddenPathFilter(boolean hadoop) throws IOException { ``` -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org