xiong duan created CALCITE-5750:
-----------------------------------

             Summary: SQL throws exception when the Filter include id = ARRAY 
[1,2,3]
                 Key: CALCITE-5750
                 URL: https://issues.apache.org/jira/browse/CALCITE-5750
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.34.0
            Reporter: xiong duan
            Assignee: xiong duan


When we create a PostgreSQL table as:
{code:java}
create table "arrayTest"
(
    id integer[]
); {code}
Execute the SQL :
{code:java}
select  * from arrayTest where id = array [1,2,3] and id = array [2] {code}
Will throws the exception:
{code:java}
java.lang.UnsupportedOperationException: Unsupported type when 
convertTypeToSpec: ANY

Suppressed: java.lang.Throwable: Error while converting RelNode to SqlNode:
JdbcFilter(condition=[AND(=($0, ARRAY(CAST(1:BIGINT):ANY, CAST(2:BIGINT):ANY, 
CAST(3:BIGINT):ANY)), =($0, ARRAY(CAST(2:BIGINT):ANY)))])
  JdbcTableScan(table=[[FOODMART, arrayTest]]){code}



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

Reply via email to