-
Notifications
You must be signed in to change notification settings - Fork 465
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
sqllogictest: treat -0 as 0 #7096
sqllogictest: treat -0 as 0 #7096
Conversation
For some reason, slt_good_0.test:51762 returns -0 under a coverage build and 0 otherwise. To make the test pass in both environments, have the test driver remove the minus sign from any -0 values.
I'm not very familiar with the inner-workings of As for APD, that is a replacement only for the |
Yeah, this seems very scary to me. Our coverage builds are resulting in different results than the normal builds?! Yeesh. |
I actually think this is just a bug in how we format floats as integers in the SLT runner. Probably shouldn't be outputting |
I'm actually surprised we're not getting |
I wonder if it's actually that a newer version of Rust (i.e., nightly) has changed how |
Oh, yeah, here ya go: rust-lang/rust#78618. They changed it in Rust 1.53. |
In SQLite's SLT, floats are printed as integers by casting the float to an integer then printing the integer. Our SLT runner was printing floats rounding the float then printing the float with zero digits after the decimal point. This is almost the same thing, except that "0" is printed as "-0" since rust-lang/rust#78618. Future proof the code (and make it work the same way in the nightly coverage build) by following the SQLite approach. Supersedes MaterializeInc#7096.
I sent #7102 to fix this. |
In SQLite's SLT, floats are printed as integers by casting the float to an integer then printing the integer. Our SLT runner was printing floats rounding the float then printing the float with zero digits after the decimal point. This is almost the same thing, except that "0" is printed as "-0" since rust-lang/rust#78618. Future proof the code (and make it work the same way in the nightly coverage build) by following the SQLite approach. Supersedes MaterializeInc#7096.
Thank you both, I am abandoning this PR. |
In SQLite's SLT, floats are printed as integers by casting the float to an integer then printing the integer. Our SLT runner was printing floats rounding the float then printing the float with zero digits after the decimal point. This is almost the same thing, except that "0" is printed as "-0" since rust-lang/rust#78618. Future proof the code (and make it work the same way in the nightly coverage build) by following the SQLite approach. Supersedes MaterializeInc#7096.
In SQLite's SLT, floats are printed as integers by casting the float to an integer then printing the integer. Our SLT runner was printing floats rounding the float then printing the float with zero digits after the decimal point. This is almost the same thing, except that "0" is printed as "-0" since rust-lang/rust#78618. Future proof the code (and make it work the same way in the nightly coverage build) by following the SQLite approach. Supersedes MaterializeInc#7096.
For some reason, slt_good_0.test:51762 returns -0 under a coverage
build and 0 otherwise. To make the test pass in both environments,
have the test driver remove the minus sign from any -0 values.
I am proposing this change because of the following two things:
In other words
-0
is returned where0
was previously expected.The normal build is not affected. This may be a bug in the compiler or the coverage instrumentation.