kbendick commented on code in PR #5009:
URL: https://github.com/apache/iceberg/pull/5009#discussion_r919712187
##########
core/src/main/java/org/apache/iceberg/SnapshotSummary.java:
##########
@@ -186,7 +187,13 @@ public Map<String, String> build() {
metrics.addTo(builder);
setIf(deletedDuplicateFiles > 0, builder, DELETED_DUPLICATE_FILES,
deletedDuplicateFiles);
- Set<String> changedPartitions = partitionMetrics.keySet();
+ // Exclude the key that corresponds to PartitionSpec.unpartitioned().
+ // We might want to keep it if and only if the table has had its
partition spec updated over time and the
+ // write hit two specs (unpartitioned / VOID and an actual bound
partition spec).
+ Set<String> changedPartitions = partitionMetrics.keySet()
+ .stream()
+ .filter(partKey -> partKey != null && !partKey.isEmpty())
+ .collect(Collectors.toSet());
Review Comment:
And as mentioned elsewhere, we _do_ want to include some of the metrics
about the root partition regardless (just not the summary).
--
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]