Skip to content

sqllogictest: correct printing floats as integers - #7102

Merged
philip-stoev merged 1 commit into
MaterializeInc:mainfrom
benesch:slt-float-integer-cast
Jun 21, 2021
Merged

sqllogictest: correct printing floats as integers#7102
philip-stoev merged 1 commit into
MaterializeInc:mainfrom
benesch:slt-float-integer-cast

Conversation

@benesch

Copy link
Copy Markdown
Contributor

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 #7096.

@beneschbenesch mentioned this pull request Jun 18, 2021
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.
@benesch
beneschforce-pushed the slt-float-integer-cast branch from 07c9b2b to de67876CompareJune 18, 2021 21:03

@philip-stoevphilip-stoev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thank you, the coverage test is now happy.

@philip-stoev
philip-stoev merged commit e301e19 into MaterializeInc:mainJun 21, 2021
Sign up for freeto 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.

2 participants

@benesch@philip-stoev