Anurag-S1ngh opened a new pull request, #4407: URL: https://github.com/apache/iceberg-python/pull/4407
## Summary The writer, like Java, truncates with two's complement arithmetic, so values from the minimum of the type wrap to a partition value at the top of the range. The Python transform did not wrap, so scan planning projected a different partition, pruned the file, and lost those rows for `EqualTo`, `In`, and range filters. ## Changes - Wrap the Python truncate transform into the range of the source type, which fixes `EqualTo` and `In`. - Add the wrapped partition value to the inclusive projection of ranges that can match it. Greater-than filters use the first partition after the block that holds the minimum, because the boundary itself wraps. - Skip the inclusive projection in the residual evaluator when a transform projects to an expression instead of a single predicate. Residuals are an optimization, so falling back to the original predicate is safe. The writer output is unchanged, matching Java and existing tables. ## Testing - Added tests for the transform at the type minimum, the projections near the minimum, and an end-to-end scan of a `truncate[1000]` int partition with `EqualTo`, `LessThan`, and `GreaterThan` at the minimum. - `make test` passes (4695 passed, 5 skipped). Closes #4403 -- 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]
