prestodb / presto-admin

A tool to install, configure and manage Presto installations
http://prestodb.github.io/presto-admin/
Apache License 2.0
171 stars 101 forks source link

Incorrect Division #375

Closed ramyatamehrotra closed 6 years ago

ramyatamehrotra commented 6 years ago

If you look at the query below, you will observe that when two numbers which have six decimal places where at least the last digit is 0, the result of the division is incorrect.

Operating system name and version - CentOS 6 Presto Version - 0.167-T.0.9 Any details about your local setup that might be helpful in troubleshooting - N/A Detailed steps to reproduce the bug - See the query below for reference.

Query: select 2154 as numerator , 2736 as denominator , 2158.888 1.0000/2738.888 as correct_calc , 2158.88800 1.0000/2738.88800 as correct_calc1 , 2158.888000 * 1.0000/2738.888000 as bug ;

Result: numerator | denominator | correct_calc | correct_calc1 | bug 2154 | 2736 | 0.7882 | 0.7882 | 0.5442

findepi commented 6 years ago

This doesn't look like presto-admin issue. If you wanted to report an issue for Presto, https://github.com/prestodb/presto/issues would be the right place. Let me close this one.

Presto Version - 0.167-T.0.9

0.167 is pretty old version. If you report your issue at https://github.com/prestodb/presto/issues, the first question will probably be "does it reproduce on some recent release?".