amogh-jahagirdar commented on code in PR #17497:
URL: https://github.com/apache/iceberg/pull/17497#discussion_r3707852389
##########
core/src/main/java/org/apache/iceberg/rest/TableScanResponseParser.java:
##########
@@ -99,14 +100,14 @@ public static void serializeScanTasks(
Map<Integer, PartitionSpec> specsById,
JsonGenerator gen)
throws IOException {
- Map<String, Integer> deleteFilePathToIndex = Maps.newHashMap();
+ Map<DeleteFileWrapper, Integer> deleteFileToIndex = Maps.newHashMap();
Review Comment:
Normally, I think I'd have this map be defined to the interface `DeleteFile`
(and the implementation just uses the DeleteFileWrapper when populating for
correctness of the fix) but in this case I think it's actually better to define
it to the concrete implementation as it's done here because it makes it clear
that this really does need to be the wrapper for proper uniqueness comparison.
It guarantees at compile tme that if someone changes the below logic to
populate some other type of DeleteFile that we're doing something wrong.
--
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]