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 #5245
Is your feature request related to a problem or challenge? Please describe what you are trying to do.
The
logfunction has some discrepancy with Postgres for edgecases e.g.The query executes ok, but in PostgresSql the query fail fast
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 #5245