singhpk234 commented on code in PR #4660:
URL: https://github.com/apache/iceberg/pull/4660#discussion_r860916550
##########
core/src/main/java/org/apache/iceberg/SnapshotSummary.java:
##########
@@ -181,14 +181,14 @@ public Map<String, String> build() {
builder.putAll(properties);
metrics.addTo(builder);
- setIf(deletedDuplicateFiles > 0, builder, DELETED_DUPLICATE_FILES,
deletedDuplicateFiles);
+ SnapshotSummary.set(builder, DELETED_DUPLICATE_FILES,
deletedDuplicateFiles);
Set<String> changedPartitions = partitionMetrics.keySet();
- setIf(trustPartitionMetrics, builder, CHANGED_PARTITION_COUNT_PROP,
changedPartitions.size());
+ SnapshotSummary.set(builder, CHANGED_PARTITION_COUNT_PROP,
changedPartitions.size());
if (trustPartitionMetrics && changedPartitions.size() <=
maxChangedPartitionsForSummaries) {
- setIf(changedPartitions.size() > 0, builder, PARTITION_SUMMARY_PROP,
"true");
+ SnapshotSummary.set(builder, PARTITION_SUMMARY_PROP, "true");
Review Comment:
I believe we need this check back, as if `changedPartitions` is empty, I
think we should not add `PARTITION_SUMMARY_PROP` prop (may be we can club this
requirement with L#188 above).
Otherwise it could give an impression we have partition summary but it's
empty . Your thoughts ?
--
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]