-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
bugSomething isn't workingSomething isn't working
Milestone
Description
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). User guide will also need updating.
Additional context
Related to #2420
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working