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

   **Describe the bug**
   
   `round` accepts two arguments, but is also defined as a unary function. The 
second parameter is ignored.
   
   ```
   ❯ select round(3.141592, 0);
   +-----------------------------------+
   | round(Float64(3.141592),Int64(0)) |
   +-----------------------------------+
   | 3                                 |
   +-----------------------------------+
   1 row in set. Query took 0.000 seconds.
   
   ❯ select round(3.141592, -2);
   +------------------------------------+
   | round(Float64(3.141592),Int64(-2)) |
   +------------------------------------+
   | 3                                  |
   +------------------------------------+
   1 row in set. Query took 0.000 seconds.
   
   ❯ select round(3.141592, 2);
   +-----------------------------------+
   | round(Float64(3.141592),Int64(2)) |
   +-----------------------------------+
   | 3                                 |
   +-----------------------------------+
   1 row in set. Query took 0.000 seconds.
   ```
   
   **To Reproduce**
   See above
   
   **Expected behavior**
   I expect the behavior to be consistent with Postgres `round(v numeric, s 
int)`
   
   **Additional context**
   Related to https://github.com/apache/arrow-datafusion/issues/2420
   


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