openinx commented on pull request #1792:
URL: https://github.com/apache/iceberg/pull/1792#issuecomment-731706627


   > And toString isn't implemented by AbstractSet so I don't see much value in 
adding the superclass. 
   
   The `AbstractSet` extends `AbstractCollection`, and the `toString` is 
implemented in `AbstractCollection`.  I want the `toString`  because when the 
test cases from `DeleteReadTests` are broken, I will need to see what are 
values in the collection,  there're many places where we use the 
`StructLikeSet` to assert, for example: 
   
   ```java
     @Test
     public void testPositionDeletes() throws IOException {
       List<Pair<CharSequence, Long>> deletes = Lists.newArrayList(
           Pair.of(dataFile.path(), 0L), // id = 29
           Pair.of(dataFile.path(), 3L), // id = 89
           Pair.of(dataFile.path(), 6L) // id = 122
       );
   
       Pair<DeleteFile, Set<CharSequence>> posDeletes = 
FileHelpers.writeDeleteFile(
           table, Files.localOutput(temp.newFile()), Row.of(0), deletes);
   
       table.newRowDelta()
           .addDeletes(posDeletes.first())
           .validateDataFilesExist(posDeletes.second())
           .commit();
   
       StructLikeSet expected = rowSetWithoutIds(29, 89, 122);
       StructLikeSet actual = rowSet(tableName, table, "*");
   
       Assert.assertEquals("Table should contain expected rows", expected, 
actual);
     }
   ```


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

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