waterWang opened a new pull request, #17559: URL: https://github.com/apache/iceberg/pull/17559
Fixes #17558 Parquet's Statistics#getNumNulls returns -1 when null_count is missing from the column chunk statistics. The current code unconditionally adds -1 to the accumulated null count, which produces incorrect results when multiple row groups are merged across a column chunk. For example, with row group 0 having 1 null and row group 1 missing null_count (returning -1), the total becomes 0 instead of at least 1. A query engine relying on null count could skip the file entirely when evaluating predicates like WHERE c IS NULL, causing wrong results. This fix wraps all getNumNulls() calls with Math.max(..., 0) to safely handle the missing null_count case across all four code paths: counts(), bounds(), and the two variant metric methods. -- 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]
