rdblue commented on a change in pull request #3696:
URL: https://github.com/apache/iceberg/pull/3696#discussion_r766262762
##########
File path: core/src/main/java/org/apache/iceberg/SnapshotSummary.java
##########
@@ -321,6 +323,23 @@ void merge(UpdateMetrics other) {
}
}
+ protected static Map<String, String> fetchTotalStatsFromSummary(Map<String,
String> summary) {
+ ImmutableMap.Builder<String, String> builder = ImmutableMap.builder();
+ List<String> totalProps = Arrays.asList(
+ TOTAL_DATA_FILES_PROP,
+ TOTAL_DELETE_FILES_PROP,
+ TOTAL_EQ_DELETES_PROP,
+ TOTAL_POS_DELETES_PROP,
+ TOTAL_FILE_SIZE_PROP,
+ TOTAL_RECORDS_PROP);
Review comment:
This creates a new list each time through the method. Instead, can you
save this as a static final field?
--
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]