Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testutils/floatcmp: revert to base-10 normalization in FloatsMatch #107490

Merged
merged 1 commit into from
Jul 24, 2023

Conversation

michae2
Copy link
Collaborator

@michae2 michae2 commented Jul 24, 2023

In #106552 we tried changing float normalization to use base 2 instead of base 10 (in other words, to use math.Frexp instead of our hand-rolled normalize). This appears to have broken a logic test, so revert back to the pre-existing base 10 normalization.

Fixes: #107461

Release note: None

@michae2 michae2 requested review from mgartner, rharding6373 and a team July 24, 2023 19:23
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix! :lgtm:

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @mgartner and @michae2)


-- commits line 6 at r1:
Could you add the failure case to TestFloatsMatch?

In cockroachdb#106552 we tried changing float normalization to use base 2 instead
of base 10 (in other words, to use `math.Frexp` instead of our
hand-rolled `normalize`). This appears to have broken a logic test, so
revert back to the pre-existing base 10 normalization.

Fixes: cockroachdb#107461

Release note: None
Copy link
Collaborator Author

@michae2 michae2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're welcome! Sorry I made the suggestion in the first place. 😝

bors r=rharding6373 p=99

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @mgartner and @rharding6373)


-- commits line 6 at r1:

Previously, rharding6373 (Rachael Harding) wrote…

Could you add the failure case to TestFloatsMatch?

Done.

Copy link
Collaborator

@DrewKimball DrewKimball left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (and 1 stale) (waiting on @mgartner and @rharding6373)

@craig
Copy link
Contributor

craig bot commented Jul 24, 2023

Build succeeded:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pkg/sql/logictest/tests/local-mixed-22.2-23.1/local-mixed-22_2-23_1_test: TestLogic_trigram_builtins failed
4 participants