github-actions[bot] commented on code in PR #68433:
URL: https://github.com/apache/doris/pull/68433#discussion_r4128892247
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java:
##########
@@ -2432,9 +2432,12 @@ protected List<FileScanTask>
loadFileScanTasksWithManifestCache(
deleteFiles.addAll(value.getDeleteFiles());
}
- // Build delete file index for efficient lookup of deletes applicable
to each data file
+ // Build delete file index for efficient lookup of deletes applicable
to each data file.
+ // Equality deletes may reference fields dropped from the current
schema, so resolve their
+ // field IDs against every historical schema like Iceberg's
DataTableScan does.
DeleteFileIndex deleteIndex = DeleteFileIndex.builderFor(deleteFiles)
.specsById(specsById)
+ .schemasById(icebergTable.schemas())
Review Comment:
Please gate the historical-schema lookup on the presence of equality
deletes. This call makes every uncached manifest-cache plan sort and merge all
table schemas in DeleteFileIndex.Builder.build(), even when deleteFiles is
empty or contains only position deletes. On a table with many schema revisions,
ordinary scans now pay work proportional to the full schema history for an
index that never needs field lookup. Keep schemasById for equality deletes,
where the dropped-field fix requires it.
--
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]