jonahgao commented on issue #11051:
URL: https://github.com/apache/datafusion/issues/11051#issuecomment-2185068003

   arrow-rs 
[follows](https://github.com/apache/arrow-rs/blob/a35214f92ad7c3bce19875bb091cb776447aa49e/arrow-arith/src/numeric.rs#L74)
 the rules of IEEE 754. If we intend to be compatible with other engines, many 
cases will also need to be modified, such as division by zero.
   ```sh
   DataFusion CLI v39.0.0
   > select 1.0/0.0;
   +-------------------------+
   | Float64(1) / Float64(0) |
   +-------------------------+
   | inf                     |
   +-------------------------+
   
   
   > select 0.0/0.0;
   +-------------------------+
   | Float64(0) / Float64(0) |
   +-------------------------+
   | NaN                     |
   +-------------------------+
   ```
   In PostgreSQL:
   ```sh
   postgres=# select 1.0/0.0;
   ERROR:  division by zero
   postgres=# select 0.0/0.0;
   ERROR:  division by zero
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to