timothyw553 commented on code in PR #19133:
URL: https://github.com/apache/iceberg/pull/19133#discussion_r4769401143
##########
core/src/main/java/org/apache/iceberg/MetricsConfig.java:
##########
@@ -260,7 +260,17 @@ public static MetricsConfig from(Map<String, String>
props, Schema schema, SortO
return from(props, schema, order, null);
}
- private static MetricsConfig from(
+ /**
+ * Generate a MetricsConfig for all columns based on overrides, schema, and
sort order.
+ *
+ * @param props will be read for metrics overrides
(write.metadata.metrics.column.*) and default
+ * (write.metadata.metrics.default)
+ * @param schema table schema
+ * @param order sort order columns, will be promoted to truncate(16)
Review Comment:
nit: the `@param order` and `@param spec` javadoc doesn't quite match the
precedence or `null` behavior -- explicit column modes override sort defaults
(and non-order-preserving transforms like bucket aren't promoted), while
order-preserving partition columns force `full` even over explicit modes. could
we clarify what passing `null` does too?
```diff
- * @param order sort order columns, will be promoted to truncate(16)
- * @param spec partition spec
+ * @param order sort order, or null to skip sort-based defaults;
order-preserving source columns
+ * use truncate(16) when the default is unset, none, or counts;
explicit column modes override
+ * sort-based defaults
+ * @param spec partition spec, or null to skip partition-based overrides;
order-preserving source
+ * columns use full metrics regardless of configured modes
```
--
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]