You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by et...@apache.org on 2026/07/29 12:12:51 UTC
(iceberg) branch metrics-for-structs created (now 7b6027f75c)
This is an automated email from the ASF dual-hosted git repository.
nastra pushed a change to branch metrics-for-structs
in repository https://gitbox.apache.org/repos/asf/iceberg.git
at 7b6027f75c API: Fix struct metrics in nested struct evaluator test
This branch includes the following new commits:
new 7b6027f75c API: Fix struct metrics in nested struct evaluator test
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(iceberg) 01/01: API: Fix struct metrics in nested struct evaluator test
Posted by et...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
nastra pushed a commit to branch metrics-for-structs
in repository https://gitbox.apache.org/repos/asf/iceberg.git
commit 7b6027f75cff6dbe03bd28f75c63d26f7aaf0e48
Author: Eduard Tudenhoefner <et...@gmail.com>
AuthorDate: Wed Jul 29 14:12:39 2026 +0200
API: Fix struct metrics in nested struct evaluator test
`FILE_6` in `TestInclusiveMetricsEvaluator` carried value and null counts for the
`required_address` and `optional_address` structs. Parquet produces metrics for leaf
columns only in `ParquetMetrics.MetricsVisitor.struct` and returns just the concatenation of
its children and never emits a `FieldMetrics` for the struct — so no Parquet file yields
those entries. They made `notNull("optional_address")` appear prunable when in practice it is not
---
.../apache/iceberg/expressions/TestInclusiveMetricsEvaluator.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/api/src/test/java/org/apache/iceberg/expressions/TestInclusiveMetricsEvaluator.java b/api/src/test/java/org/apache/iceberg/expressions/TestInclusiveMetricsEvaluator.java
index 8d652df0df..e549970c1c 100644
--- a/api/src/test/java/org/apache/iceberg/expressions/TestInclusiveMetricsEvaluator.java
+++ b/api/src/test/java/org/apache/iceberg/expressions/TestInclusiveMetricsEvaluator.java
@@ -210,9 +210,9 @@ public class TestInclusiveMetricsEvaluator {
Row.of(),
10,
// any value counts, including nulls
- ImmutableMap.of(100, 5L, 101, 5L, 102, 5L, 103, 5L, 104, 5L, 105, 5L),
+ ImmutableMap.of(102, 5L, 103, 5L, 104, 5L, 105, 5L),
// null value counts
- ImmutableMap.of(100, 0L, 101, 5L, 103, 5L, 104, 5L, 105, 5L),
+ ImmutableMap.of(103, 5L, 104, 5L, 105, 5L),
// nan value counts
null,
// lower bounds
@@ -921,7 +921,7 @@ public class TestInclusiveMetricsEvaluator {
// read optional_address and its nested fields
shouldRead =
new InclusiveMetricsEvaluator(NESTED_SCHEMA, isNull("optional_address")).eval(FILE_6);
- assertThat(shouldRead).as("Should read: optional_address is optional").isTrue();
+ assertThat(shouldRead).as("Should read: metrics are not tracked for structs").isTrue();
shouldRead =
new InclusiveMetricsEvaluator(NESTED_SCHEMA, isNull("optional_address.required_street2"))
@@ -958,7 +958,7 @@ public class TestInclusiveMetricsEvaluator {
// read optional_address and its nested fields
shouldRead =
new InclusiveMetricsEvaluator(NESTED_SCHEMA, notNull("optional_address")).eval(FILE_6);
- assertThat(shouldRead).as("Should not read: optional_address is optional").isFalse();
+ assertThat(shouldRead).as("Should read: metrics are not tracked for structs").isTrue();
shouldRead =
new InclusiveMetricsEvaluator(NESTED_SCHEMA, notNull("optional_address.required_street2"))