nastra commented on code in PR #15251:
URL: https://github.com/apache/iceberg/pull/15251#discussion_r2787395547
##########
core/src/main/java/org/apache/iceberg/MetricsUtil.java:
##########
@@ -476,4 +481,73 @@ public <T> void set(int pos, T value) {
throw new UnsupportedOperationException("StructWithReadableMetrics is
read only");
}
}
+
+ public static ContentStats fromMetrics(Schema schema, Metrics metrics) {
+ if (null == metrics) {
+ return null;
+ }
+
+ BaseContentStats.Builder builder =
BaseContentStats.builder().withTableSchema(schema);
+ Map<Integer, BaseFieldStats<?>> map = Maps.newHashMap();
Review Comment:
I think that makes sense to switch to a builder, since there's really no
need to re-create objects all the time
--
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]