ebyhr commented on code in PR #18936:
URL: https://github.com/apache/iceberg/pull/18936#discussion_r4569881562


##########
core/src/main/java/org/apache/iceberg/PartitionStatsHandler.java:
##########
@@ -183,11 +185,23 @@ private static OutputFile newPartitionStatsFile(
   private static Collection<PartitionStatistics> 
computeAndMergeStatsIncremental(
       Table table, Snapshot snapshot, long lastSnapshotWithStats) {
     PartitionMap<PartitionStatistics> statsMap = 
PartitionMap.create(table.specs());
+    StructType partitionType = Partitioning.partitionType(table);
+    Map<Integer, StructProjection> specPartitions = Maps.newHashMap();
     try (CloseableIterable<PartitionStatistics> oldStats =
         
table.newPartitionStatisticsScan().useSnapshot(lastSnapshotWithStats).scan()) {
-      oldStats.forEach(
-          partitionStats ->
-              statsMap.put(partitionStats.specId(), 
partitionStats.partition(), partitionStats));

Review Comment:
   #18784 rewrites this path, and I think it makes the `PartitionStatsHandler` 
change here redundant. I ran `incrementalComputeAfterRemovingPartitionField` on 
top of #18784 without the `PartitionStatsHandler` change, and it passes.
   
   Could you rebase on #18784 once it merges and keep only the test? Otherwise 
the two PRs will conflict in `PartitionStatsHandler.java`.



-- 
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]

Reply via email to