You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "amogh-jahagirdar (via GitHub)" <gi...@apache.org> on 2026/09/29 15:03:38 UTC
Re: [PR] Core: Make MetricsConfig.forTable collect full metrics for order preserving transform source fields [iceberg]
amogh-jahagirdar commented on code in PR #17960:
URL: https://github.com/apache/iceberg/pull/17960#discussion_r4134998375
##########
core/src/main/java/org/apache/iceberg/MetricsConfig.java:
##########
@@ -255,9 +260,36 @@ public Set<Integer> map(
* @return metrics configuration
*/
public static MetricsConfig from(Map<String, String> props, Schema schema, SortOrder order) {
- int maxInferredDefaultColumns = maxInferredColumnDefaults(props);
Map<Integer, String> idToName = Maps.newHashMap();
Map<String, MetricsMode> columnModes = Maps.newHashMap();
+ MetricsMode defaultMode = defaultModeFor(props, schema, order, columnModes, idToName);
+ return new MetricsConfig(columnModes, defaultMode, idToName);
+ }
+
+ private static MetricsConfig from(
+ Map<String, String> props,
+ Schema schema,
+ SortOrder order,
+ PartitionSpec spec,
+ int formatVersion) {
+ Map<Integer, String> idToName = Maps.newHashMap();
+ Map<String, MetricsMode> columnModes = Maps.newHashMap();
+ MetricsMode defaultMode = defaultModeFor(props, schema, order, columnModes, idToName);
+
+ if (formatVersion >= 4) {
+ configureFullMetricsForPartitionSourceColumns(spec, schema, columnModes, idToName);
Review Comment:
That's a great point, that approach makes the upgrde path be able to make better tightness assumptions. I went ahead and made that change.
--
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: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org