[ 
https://issues.apache.org/jira/browse/CALCITE-6950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17944267#comment-17944267
 ] 

Julian Hyde commented on CALCITE-6950:
--------------------------------------

I thought the argument to ANY had to be a subquery. Since when did we allow it 
on arrays?

> Use ANY operator to check if an element exists in an array throws exception
> ---------------------------------------------------------------------------
>
>                 Key: CALCITE-6950
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6950
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: xiong duan
>            Priority: Major
>
> The unit test in dummy.iq:
> {code:java}
> !use scott
> SELECT
>   *
> FROM
>   "scott".emp
> WHERE
>    'SMITH' = ANY (string_to_array(ename, ',')); {code}
> Caused by: org.apache.calcite.runtime.CalciteContextException: From line 6, 
> column 4 to line 6, column 46: Values passed to IN operator must have 
> compatible types.
> In SqlQuantifyOperator#tryDeriveTypeForCollection, use the sameNamedType to 
> verify types. 
> VARCHAR(10) and CHAR(10) are considered different.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to