Describe the bug
Filing on behalf @krinart / #20658
Two regressions in the DuckDB federation unparser after upgrading to DataFusion 52:
- clickbench q25: Queries like
SELECT "SearchPhrase" ... ORDER BY to_timestamp("EventTime") LIMIT 10 produce ORDER BY outside the subquery, referencing table names ("hits") that are out of scope.
- tpcds q36: ORDER BY with
GROUPING() expressions loses the derived_sort subquery alias, placing sort references outside their valid scope.F
To Reproduce
No response
Expected behavior
No response
Additional context
No response