You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Yanjing Wang <zh...@gmail.com> on 2022/01/18 11:56:00 UTC
[REVIEW REQUEST]: Review Request for CALCITE-4987
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))*
.
Re: [REVIEW REQUEST]: Review Request for CALCITE-4987
Posted by Yanjing Wang <zh...@gmail.com>.
Hi community,
This is a continuous review request for CALCITE-4987, I think it's helpful
for generating valid ORDER BY clause on various engine, and federated
queries will benefit from it, hence I'm honestly hoping this change will be
merged soon.
Yanjing Wang <zh...@gmail.com> 于2022年1月18日周二 19:56写道:
> 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))*
> .
>