gengliangwang opened a new pull request, #3839: URL: https://github.com/apache/iceberg-rust/pull/3839
## Which issue does this PR close? - Closes #3836. ## What changes are included in this PR? `StrictMetricsEvaluator::may_contain_nan` returned `true` whenever a data file had no NaN count for a column. NaN counts are only recorded for `float` and `double` columns, so every comparison on a column of another type returned `ROWS_MIGHT_NOT_MATCH` before the bounds were looked at. `may_contain_nan` now takes the bound reference and, when there is no NaN count, answers by the column's type: only `float` and `double` columns may contain NaN. Note for reviewers: Java's `canContainNaNs` goes one step further and treats a missing count as "no NaNs" for floating-point columns too. This PR keeps those as unknown, which is the conservative reading for files written without NaN counts. Happy to match Java exactly if that is preferred. ## Are these changes tested? Two unit tests: - `test_integer_without_nan_count`: `<`, `>=`, `=` and `IN` on an int column of a file that has no NaN count for it. It fails on main. - `test_double_without_nan_count`: a `double` column without a NaN count stays `ROWS_MIGHT_NOT_MATCH`, and matches once its NaN count is 0. ## AI Disclosure The code, the tests and this description were drafted with an AI coding assistant. I reviewed them and ran the tests locally. This pull request and its description were written by Isaac. -- 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]
