grantatspothero commented on code in PR #18359:
URL: https://github.com/apache/iceberg/pull/18359#discussion_r4208604700
##########
core/src/main/java/org/apache/iceberg/DeleteFileIndex.java:
##########
@@ -519,6 +516,26 @@ private Collection<DeleteFile> loadDeleteFiles() {
return files;
}
+ /** Copies a delete file with the minimum stats needed for indexing to
limit memory use. */
+ private static DeleteFile copyWithMinStats(
+ DeleteFile file, Map<String, String> referencedDataFiles) {
+ if (file.content() == FileContent.EQUALITY_DELETES) {
+ // copy with stats for better filtering against data file stats
+ return file.copyWithStats(Set.copyOf(file.equalityFieldIds()));
+ }
+
+ String referencedDataFile =
ContentFileUtil.referencedDataFileLocation(file);
Review Comment:
`instanceOf GenericDeleteFile` is only needed because of the referenced data
file caching change. I don't see any other `instanceOf GenericDeleteFile` calls
in iceberg.
Seems like copying file scoped position deletes without stats is an easy win
with minimal surface area. The referenced data file location caching changes
are more invasive.
--
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]