amogh-jahagirdar commented on code in PR #18598:
URL: https://github.com/apache/iceberg/pull/18598#discussion_r4447584161
##########
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:
I think this was a result of a comment I made; I don't think it's strictly
required but I figured it was a cheap thing to always project if stats are
being projected, so a caller can easily reference an accurate, known value.
Good either way.
--
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]