ebyhr opened a new pull request, #8559:
URL: https://github.com/apache/iceberg/pull/8559
Trino Iceberg connector faced a silent correctness issue because of
incorrect lower/upper bounds.
The existing logic expects 2 state (null or non-empty), but there's another
condition like:
```java
@Override
public String toString() {
if (this.hasNonNullValue()) {
if (isNumNullsSet()) {
return String.format("min: %s, max: %s, num_nulls: %d",
minAsString(), maxAsString(), this.getNumNulls());
} else {
return String.format("min: %s, max: %s, num_nulls not defined",
minAsString(), maxAsString());
}
} else if (!this.isEmpty())
return String.format("num_nulls: %d, min/max not defined",
this.getNumNulls());
else
return "no stats for this column";
}
```
https://github.com/apache/parquet-mr/blob/9b5a962df3007009a227ef421600197531f970a5/parquet-column/src/main/java/org/apache/parquet/column/statistics/Statistics.java#L445-L457
When `Statistics.hasNonNullValue` is false &
`Statistics.isEmpty` is true, `ParquetUtil.footerMetrics` doesn't treat the
field as missing and it generates incorrect metrics.
--
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]