-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
This should not work:
> select sum(num) within group (order by num) from '/Users/jeffrey/Downloads/test.csv';
+------------------------------------------------------------------------------------------------------------+
| sum(/Users/jeffrey/Downloads/test.csv.num) ORDER BY [/Users/jeffrey/Downloads/test.csv.num ASC NULLS LAST] |
+------------------------------------------------------------------------------------------------------------+
| 750 |
+------------------------------------------------------------------------------------------------------------+
1 row(s) fetched.
Elapsed 0.011 seconds.WITHIN GROUP should be allowed only for ordered set aggregate functions (see #12824)
Postgres for reference:
postgres=# select sum(salary) within group (order by salary) from employees;
ERROR: function sum(numeric, numeric) does not exist
LINE 1: select sum(salary) within group (order by salary) from emplo...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
postgres=# select sum() within group (order by salary) from employees;
ERROR: sum is not an ordered-set aggregate, so it cannot have WITHIN GROUP
LINE 1: select sum() within group (order by salary) from employees;To Reproduce
No response
Expected behavior
No response
Additional context
See these comments:
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working