[
https://issues.apache.org/jira/browse/CALCITE-5127?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17601756#comment-17601756
]
Stamatis Zampetakis commented on CALCITE-5127:
----------------------------------------------
[~libenchao][~julianhyde] As far as I can see the changes proposed in the PR
should not really affect significantly the disabled tests in CALCITE-1045
("fixed.calcite1045" ). Actually, I run the disabled tests in 1.22.0 release
(537b8dbb4b58c61b6c573eb07a51b8d38896a1ff) and they seem to run there as well;
I didn't verify meticulously plan and results but there are no
exceptions/failures. It would be good to enable them but maybe it is better to
do it as a separate jira/commit to avoid giving the false impression that this
PR fixed everything.
[~libenchao] Both ideas below sound reasonable to me. It's a trade-off between
performance/simplicity and accuracy. In this case, I have a slight preference
for performance/simplicity (sub-query approach) but leaving the final decision
to you since you have worked more into this problem.
{quote}Maybe another more coarse-grained way is to identify RexSubQuery without
distinguishing the correlated subquery and non-correlated subquery? Or we can
add another version of RexUtil.containsCorrelation which will go deeply into
the RexSubQuery referenced RelNode?
{quote}
> Error when executing query with subquery in select list that uses outer
> column of array type
> --------------------------------------------------------------------------------------------
>
> Key: CALCITE-5127
> URL: https://issues.apache.org/jira/browse/CALCITE-5127
> Project: Calcite
> Issue Type: Bug
> Components: core
> Reporter: Dmitry Sysolyatin
> Assignee: Benchao Li
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.32.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> The following queries fail:
> {code}
> 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;
>
> {code}
> With exception:
> {code}
> Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to
> java.util.List
> {code}
> You can find test cases for this task in
> https://github.com/apache/calcite/commit/27e68ded2c3bea7d7af73dd1dc156e46fb3591a8
--
This message was sent by Atlassian Jira
(v8.20.10#820010)