xiong duan created CALCITE-6950:
-----------------------------------

             Summary: 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


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