Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
The following queries fail:
SELECT ARRAY(SELECT s.x) FROM (SELECT ARRAY[1,2,3] as x) s; SELECT ARRAY(SELECT * FROM UNNEST(s.x) y) FROM (SELECT ARRAY[1,2,3] as x) s; SELECT (SELECT CARDINALITY(s.x) LIMIT 1) FROM (SELECT ARRAY[1,2,3] as x) s;
With exception:
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.List
You can find test cases for this task in https://github.com/apache/calcite/commit/27e68ded2c3bea7d7af73dd1dc156e46fb3591a8
Attachments
Issue Links
- duplicates
-
CALCITE-4913 Correlated variables in a select list are not deduplicated
- Closed
- is related to
-
CALCITE-5213 PROJECT_TO_SUBQUERY producing Incorrect tree from nested correlated subqueries in projections with correlations in filters.
- Open
-
CALCITE-1045 Decorrelate sub-queries in Project and Join
- Reopened
-
CALCITE-5209 Proper sub-query handling if it is used inside select list and group by
- Closed
- relates to
-
CALCITE-5390 RelDecorrelator throws NullPointerException
- Open
-
CALCITE-3870 Change the default value of SqlToRelConverter.Config.expand from true to false
- Closed
-
CALCITE-5310 JSON_OBJECT in scalar sub-query throws AssertionError
- Closed
- links to