ORDER BY min(x) results in error Plan("No field named 'foo.x'. Valid fields are 'MIN(foo.x)'.")
#1479
Labels
bug
Something isn't working
datafusion
Changes in the datafusion crate
good first issue
Good for newcomers
Describe the bug
You can not refer to an aggregate directly in the ORDER BY clause
To Reproduce
Expected behavior
The query should produce a single column, with a single row
1
Note there are several workarounds to express this query that do work:
Refer to the item by index:
Given the query an alias:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: