ajantha-bhat commented on code in PR #13425:
URL: https://github.com/apache/iceberg/pull/13425#discussion_r2174230531
##########
core/src/main/java/org/apache/iceberg/PartitionStatsHandler.java:
##########
@@ -226,7 +278,12 @@ public static CloseableIterable<PartitionStats>
readPartitionStatsFile(
CloseableIterable<StructLike> records =
InternalData.read(fileFormat, inputFile).project(schema).build();
- return CloseableIterable.transform(records,
PartitionStatsHandler::recordToPartitionStats);
+
+ if (schema.findField(DV_COUNT.name()) == null) {
+ return CloseableIterable.transform(records,
PartitionStatsHandler::recordToPartitionStats);
+ } else {
+ return CloseableIterable.transform(records,
PartitionStatsHandler::recordToPartitionStatsV3);
Review Comment:
added a new function `recordToPartitionStatsV3` instead of passing the
format version to `recordToPartitionStats` because
`CloseableIterable.transform` needs a `Function` interface (which accepts one
argument)
--
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]