Skip to content

Commit feb9104

Browse files
committed
ice: Fix ParquetUtil.footerMetrics returning garbage nullCount when unset
1 parent f9c34d9 commit feb9104

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ice/src/main/java/org/apache/iceberg/parquet/ParquetUtil.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ public static Metrics footerMetrics(
134134

135135
Statistics stats = column.getStatistics();
136136
if (stats != null && !stats.isEmpty()) {
137-
increment(nullValueCounts, fieldId, stats.getNumNulls());
137+
if (stats.isNumNullsSet()) {
138+
increment(nullValueCounts, fieldId, stats.getNumNulls());
139+
}
138140

139141
// when there are metrics gathered by Iceberg for a column, we should use those instead
140142
// of the ones from Parquet

0 commit comments

Comments
 (0)