Hi community,
I'd like to request a review on CALCITE-4987(
https://github.com/apache/calcite/pull/2693), which also fixes CALCITE-2552.
 After this fix, the RelToSqlConverter will generate ORDER BY clause by
dialect's conformance, and prefer ORDER BY ordinal rather alias when both
is supported.
This fix will avoid two issues:
1. Generate ORDER BY fields syntax that Some dialects don't support like
Hive.
2. Resolved to be ORDER BY nested aggregate expression when ORDER BY
aggregate expression argument collides with SELECT ITEM alias.
such as *SELECT sum(shelf_width) as shelf_width FROM product ORDER BY
sum(shelf_width)  *will be resolved to *SELECT sum(shelf_width) as
shelf_width FROM product ORDER BY sum(sum(shelf_width))*
.

Reply via email to