Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.35.0
Description
calcite support array query constructor.
but If we run sub-query with orderby:
select array(select x from unnest(array[1,2,3]) as t(x) order by x desc); select array(select x from unnest(array[1,2,3]) as t(x) order by x asc);
they both return
+-----------+ | EXPR$0 | +-----------+ | [1, 2, 3] | +-----------+
however, we expect return [3, 2, 1] when use order by x desc.
It seems that the order by not works properly in array sub-query.
This issue is introduced by the issue https://issues.apache.org/jira/browse/CALCITE-2978
However the ARRAY is not applicable in this scenario.
Attachments
Issue Links
- is related to
-
CALCITE-2978 sorting not applied in subqueries
- Closed
- relates to
-
CALCITE-6041 MAP sub-query gives NullPointerException
- Resolved
- links to