yadavay-amzn opened a new pull request, #17261: URL: https://github.com/apache/iceberg/pull/17261
This continues #16074, which was auto-closed by the stale bot and can no longer be reopened (GitHub blocks reopening because the branch was force-pushed/recreated). Same fix, rebased onto current `main`. ## What `Identity.projectStrict()` currently produces a predicate even when the predicate term is a transform expression rather than a `BoundReference`, which yields an invalid cross-type predicate during partition projection. This adds a guard so that a non-`BoundReference` term makes `projectStrict()` return `null`, letting the projection framework fall back to `alwaysTrue`/`alwaysFalse`. `project()` delegates to `projectStrict()`, so both paths are covered. ## Why Fixes #15502 - Identity partition projection returns incorrect results when the source and projected transform types differ. ## Tests Adds a regression test in `TestProjection` that exercises the mismatched-transform case; it fails on the pre-fix code (producing an invalid `ref(...) == ...` predicate instead of `alwaysTrue`) and passes with the fix. -- 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]
