write.metadata.metrics.max-inferred-column-defaults doesn't respect nested columns #11253
Open
2 of 3 tasks
Labels
bug
Something isn't working
Apache Iceberg version
1.5.1
Query engine
Spark
Please describe the bug 🐞
write.metadata.metrics.max-inferred-column-defaults
only considers top level columns, not nested columns
iceberg/core/src/main/java/org/apache/iceberg/MetricsConfig.java
Line 136 in 1526c1f
Simply fixing this would be a behavior change that would impact people on upgrading iceberg where their previously nested structs had metrics and then suddenly after upgrade they no longer have them with new writes. we have basically 2 choices.
Ideally I think I'd want to prioritize top level columns getting metrics first and then the first fields in each struct weighted equally for metrics. so if we have multiple nested structs each one gets their first fields with metrics and not just 1 large struct consuming all the metrics.
Willingness to contribute
The text was updated successfully, but these errors were encountered: