You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "izveigor (via GitHub)" <gi...@apache.org> on 2023/06/28 18:01:25 UTC

[GitHub] [arrow-datafusion] izveigor commented on pull request #6787: Minor: add test cases with columns for math expressions

izveigor commented on PR #6787:
URL: https://github.com/apache/arrow-datafusion/pull/6787#issuecomment-1611855018

   Is the normal output `NaN`? Some SQL databases do not support the statement and prefer to use `NULL` or error output.
   Example:
   ```
   postgres=# select acosh(a), acosh(b), acosh(c) from signed_integers;
   ERROR:  input is out of range
   postgres=# select ln(a), ln(b), ln(c) from signed_integers;
   ERROR:  cannot take logarithm of a negative number
   postgres=# select log(a, 64) a, log(b), log(10, b) from signed_integers;
   ERROR:  cannot take logarithm of a negative number
   postgres=# select log(a), log(b), log(c) from signed_integers;
   ERROR:  cannot take logarithm of a negative number
   postgres=# select log2(a), log2(b), log2(c) from signed_integers;
   ERROR:  function log2(integer) does not exist
   LINE 1: select log2(a), log2(b), log2(c) from signed_integers;
                  ^
   HINT:  No function matches the given name and argument types. You might need to add explicit type casts.
   postgres=# select power(a, b), power(c, d), power(e, f) from small_floats;
   ERROR:  a negative number raised to a non-integer power yields a complex result
   postgres=# select sqrt(a), sqrt(b), sqrt(c) from signed_integers;
   ERROR:  cannot take square root of a negative number
   ```


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