Fix residual NotNaN for null partition values#3689
Open
BharatDeva wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rationale for this change
ResidualVisitor.visit_not_nancurrently treats a partition value ofNoneasAlwaysFalse(). That is inconsistent with the normal evaluator behavior and with Iceberg Java semantics:Noneis not NaN, soNotNaN(None)should evaluate to true.This PR addresses only that residual-evaluator edge case from #3498. The stricter metrics-evaluator items discussed in the issue are already covered by other active work.
Are these changes tested?
Yes. I updated the existing residual evaluator expectations for both double and float identity partitions and ran the targeted test file in a WSL-native checkout:
Result:
Additional checks:
Both passed.
Are there any user-facing changes?
Yes. Residual evaluation for
NotNaNnow treats null partition values as not-NaN instead of false. Please add the changelog label if this behavior change should appear in release notes.