rdblue commented on code in PR #17433:
URL: https://github.com/apache/iceberg/pull/17433#discussion_r3779971071
##########
core/src/main/java/org/apache/iceberg/V4ManifestReader.java:
##########
@@ -322,6 +421,13 @@ private Schema addRequiredColumns(Schema projection,
boolean hasPartitionFilter)
projectedIds.addAll(TypeUtil.getProjectedIds(unionPartitionType));
}
+ // stats needed by the filter or requested by projectStats are read even
when the caller's
+ // projection omits them
+ if (!requiredStatsType.fields().isEmpty()) {
+ projectedIds.add(TrackedFile.CONTENT_STATS_ID);
Review Comment:
I don't think this is needed. By projecting leaf fields of the stats type,
this will automatically be projected. Omitting it makes this smaller and also
avoids the ambiguity of directly projecting a struct (which in cases like
`select` will project the entire tree of fields in the struct).
--
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]