mhatipog commented on PR #19111: URL: https://github.com/apache/iceberg/pull/19111#issuecomment-7223650462
The failing `TestSystemFunctionPushDown*` cases showed the rule was too strict for `gt`/`gtEq` and pointed at a second gap: Iceberg literal comparators order null first, so `lt`/`ltEq` match a null partition value, while in SQL they do not. Spark adds no `IS NOT NULL` for function calls, so on main `SELECT ... WHERE system.days(ts) < date(...)` returns rows of the null partition when column metrics cannot prune the file (reproduced on 1.10.1 and 1.12.0 with `write.metadata.metrics.default=none`). The new commit treats `gt`/`gtEq` as NULL-safe and keeps `lt`/`ltEq` as post-scan filters. Three existing tests that used `<`, `<=` or `!=` on nullable columns now expect the post-scan filter, the row-level ones add `ts IS NOT NULL` to keep testing full pushdown, and `testNullPartitionWithFunctionPredicates` covers both directions. The push-down suites of both Spark 4.2 modules pass; without the main change the new test fails. -- 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]
