Uh oh!
There was an error while loading. Please reload this page.
Round floats but not decimals in SqlLogicTests - #13743
Conversation
- add `decimal` to function name - drop `precision` parameter as it is not supposed to affect the result
Utilize new `to_plain_string` function
findepi
commented
Dec 12, 2024
cc @gliga |
49466f2 to
e35718dCompareBefore 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
b2c20bfComparefindepi
commented
Dec 12, 2024
Bummer. We get types different from PostgreSQL, so it's hard to get results rendered the same if rendering is type dependent. |
Omega359
commented
Dec 13, 2024
I think this will impact me significantly with the sqlite test file integration I'm working on. |
findepi
commented
Dec 13, 2024
in a positive or negative manner? |
Omega359
commented
Dec 14, 2024
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) |
findepi
commented
Dec 14, 2024
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. |
Omega359
commented
Jan 14, 2025
the slt tests are in place now. We could run them with your changes and see what breaks and whether it's a correct breakage or not. |





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