Is your feature request related to a problem or challenge?
In aggregate query with order-by: order-by list should support expressions with group by columns, or aggregated aggregate columns, this syntax is widely supported (by DuckDB, postgres and likely many others)
For aggregate function in order by list case, now DataFusion only supports aggregate functions which have appeared in SELECT list
-- This is supported
select groupby1, sum(agg1)
from t1
group by groupby1
order by groupby1, sum(agg1);
-- Not supported yet in DataFusion
select groupby1, sum(agg1)
from t1
group by groupby1
order by max(agg2);
Is your feature request related to a problem or challenge?
In aggregate query with order-by: order-by list should support expressions with
group by
columns, or aggregatedaggregate
columns, this syntax is widely supported (by DuckDB, postgres and likely many others)For aggregate function in order by list case, now DataFusion only supports aggregate functions which have appeared in
SELECT
listSee example
Describe the solution you'd like
No response
Describe alternatives you've considered
No response
Additional context
No response