rdblue commented on code in PR #18598:
URL: https://github.com/apache/iceberg/pull/18598#discussion_r4447549514
##########
core/src/main/java/org/apache/iceberg/V4ManifestReader.java:
##########
@@ -539,7 +539,12 @@ private Set<Integer> idsToRestore(boolean
includePartition, Schema projection) {
Set<Integer> ids = Sets.newHashSet(REQUIRED_COLUMN_IDS);
// project the full stats struct that corresponds to each field for
which stats are needed
- statsFieldIds().stream().map(StatsUtil::toBaseId).forEach(ids::add);
+ Set<Integer> statsIds = statsFieldIds();
+ statsIds.stream().map(StatsUtil::toBaseId).forEach(ids::add);
+
+ if (!statsIds.isEmpty()) {
+ ids.add(TrackedFile.TIGHT_STATS.fieldId());
Review Comment:
Is this required? If it isn't read, then we should ensure that it is `false`
but we don't really care if the caller chooses not to read it and assumes stats
aren't tight.
--
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]