nastra commented on code in PR #8834:
URL: https://github.com/apache/iceberg/pull/8834#discussion_r1360559226


##########
core/src/test/java/org/apache/iceberg/TestManifestReader.java:
##########
@@ -61,16 +70,14 @@ public void testReaderWithFilterWithoutSelect() throws 
IOException {
     ManifestFile manifest = writeManifest(1000L, FILE_A, FILE_B, FILE_C);
     try (ManifestReader<DataFile> reader =
         ManifestFiles.read(manifest, 
FILE_IO).filterRows(Expressions.equal("id", 0))) {
-      List<String> files =
-          Streams.stream(reader).map(file -> 
file.path().toString()).collect(Collectors.toList());
+      List<DataFile> files = 
Streams.stream(reader).collect(Collectors.toList());
 
       // note that all files are returned because the reader returns data 
files that may match, and
       // the partition is
       // bucketing by data, which doesn't help filter files
-      Assert.assertEquals(
-          "Should read the expected files",
-          Lists.newArrayList(FILE_A.path(), FILE_B.path(), FILE_C.path()),
-          files);
+      assertThat(files)

Review Comment:
   I believe this can be simplified to 
   ```
       assertThat(files)
             .usingRecursiveComparison()
             .ignoringFields(
                 "dataSequenceNumber", "fileOrdinal", "fileSequenceNumber", 
"fromProjectionPos")
             .isEqualTo(Lists.newArrayList(FILE_A, FILE_B, FILE_C));
   ```
   
   that way you don't need the static final field for the comparison config



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

Reply via email to