Repository navigation
Conversation
This PR Moves the scalar `-0.0` normalization from a free function in `datafusion_common::float_semantics` to a method on `ScalarValue`. `normalize_float_scalar` was added in apache#26595 and has not been released, so it is removed rather than deprecated. The deprecated `utils::normalize_float_zero_scalar` now points to `ScalarValue::normalize`.
|
Thank you for opening this pull request! Reviewer note: cargo-semver-checks reported the current version number is not SemVer-compatible with the changes in this pull request (compared against the base branch). Details |
mkleen
marked this pull request as ready for review
October 25, 2026 01:37
kumarUjjawal
approved these changes
Oct 25, 2026
kumarUjjawal
left a comment
Contributor
There was a problem hiding this comment.
Thank you @mkleen
Looks good 👍
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.
Which issue does this PR close?
Rationale for this change
#26595 added a helper that turns
-0.0into0.0in a single value. It works on a ScalarValue, so it makes more sense as a method on ScalarValue.What changes are included in this PR?
ScalarValue::normalize().normalize_float_scalaris removed, and the code that used it now calls the new method.What is the testing strategy for this PR?
The existing test was moved along with the helper. Nothing else changes, so the existing tests still apply.
Are there any user-facing changes?
ScalarValue::normalize().normalize_float_scalaris removed. It was added in refactor: Centralize float normalization #26595 and was never part of a release, so nobody depends on it yet.