comphead opened a new issue, #5259:
URL: https://github.com/apache/arrow-datafusion/issues/5259

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   The `log` function has some discrepancy with Postgres for edgecases e.g.
   ```
   ❯ select log(1, 64), log(0);
   +-------------------------+---------------+
   | log(Int64(1),Int64(64)) | log(Int64(0)) |
   +-------------------------+---------------+
   | inf                     | -inf          |
   +-------------------------+---------------+
   ```
   The query executes ok, but in PostgresSql the query fail fast
   
   ```
   postgres=# select log(0);
   ERROR:  cannot take logarithm of zero
   postgres=# select log(1, 64);
   ERROR:  division by zero
   ```
   **Describe the solution you'd like**
   Investigate and implement log function to be the same behavior as for 
PostgresSql for edgecases above and perhaps for other like negative numbers, etc
   
   **Describe alternatives you've considered**
   Not doing this
   
   **Additional context**
   Found when working on https://github.com/apache/arrow-datafusion/pull/5245


-- 
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]

Reply via email to