You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/10/30 16:10:16 UTC

[GitHub] [arrow-datafusion] andygrove commented on issue #4035: Decimal multiplied by Float produces incorrect results

andygrove commented on issue #4035:
URL: https://github.com/apache/arrow-datafusion/issues/4035#issuecomment-1296292768

   Here is some more odd behavior:
   
   ```
   ❯ select cast(400420638.54 as decimal(32,15)) * cast(0.1 as decimal(32,15));
   +--------------------------------------+
   | Float64(400420638.54) * Float64(0.1) |
   +--------------------------------------+
   | 40042063.854000005133107             |
   +--------------------------------------+
   1 row in set. Query took 0.001 seconds.
   ```
   
   ```
   ❯ select cast(400420638.54 as decimal(32,16)) * cast(0.1 as decimal(32,16));
   +--------------------------------------+
   | Float64(400420638.54) * Float64(0.1) |
   +--------------------------------------+
   | -791820.1765126158512068             |
   +--------------------------------------+
   1 row in set. Query took 0.000 seconds.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org