-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Round floats but not decimals in SqlLogicTests #13743
base: main
Are you sure you want to change the base?
Conversation
- add `decimal` to function name - drop `precision` parameter as it is not supposed to affect the result
Utilize new `to_plain_string` function
cc @gliga |
49466f2
to
e35718d
Compare
Before the change, the request to use PostgreSQL was simply ignored when `--complete` flag was present.
- stop rounding decimal values in SLT. It's the very nature of decimal arithmetics that it should in general be exact. - round float values taking into account the bit width of the float. The Float64 carries more information than Float32 or Float16.
e35718d
to
b2c20bf
Compare
Bummer. We get types different from PostgreSQL, so it's hard to get results rendered the same if rendering is type dependent. |
I think this will impact me significantly with the sqlite test file integration I'm working on. |
in a positive or negative manner? |
Unsure @findepi. Below is an example of a variety of discrepancies between DataFusion and Postgresql results as an example of what I'm trying to deal with (df on the left, pg on the right) |
float rounding could help with some of these eg However, the reason why i didn't finish this PR is that even for existing modest number of tests this is a problem. |
Which issue does this PR close?
Closes #.
Rationale for this change
arithmetics that it should in general be exact.
Float64 carries more information than Float32 or Float16.
What changes are included in this PR?
Are these changes tested?
yes
Are there any user-facing changes?
no