tanmayrauth opened a new pull request, #3520:
URL: https://github.com/apache/iceberg-python/pull/3520
ResidualVisitor diverged from row-level expression evaluation on null values:
- visit_less_than / visit_less_than_or_equal / visit_greater_than /
visit_greater_than_or_equal compared the partition value to the literal
directly. A nullable identity-partitioned column with a None partition value
raised a TypeError (None < literal), while _ExpressionEvaluator guards with
"value is not None" and treats the row as non-matching. Add the same guard so a
null partition value yields AlwaysFalse instead of crashing during scan
planning (ResidualEvaluator.residual_for).
- visit_not_nan returned AlwaysFalse for a None value because None is not a
SupportsFloat, whereas _ExpressionEvaluator.visit_not_nan (val == val) treats
null as satisfying not-NaN. Invert the check so only NaN fails not-NaN and null
(and any non-float value) passes, matching row evaluation.
Update the test that encoded the old NotNaN(None) -> AlwaysFalse result and
add a regression test covering None partition values for all four ordering
comparisons.
Fixes #3498 (partially)
<!--
Thanks for opening a pull request!
-->
<!-- In the case this PR will resolve an issue, please replace
${GITHUB_ISSUE_ID} below with the actual Github issue id. -->
<!-- Closes #${GITHUB_ISSUE_ID} -->
# Rationale for this change
## Are these changes tested?
## Are there any user-facing changes?
<!-- In the case of user-facing changes, please add the changelog label. -->
--
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]