You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "xiong duan (Jira)" <ji...@apache.org> on 2023/06/08 11:59:00 UTC

[jira] [Commented] (CALCITE-5750) SQL throws exception when the Filter include id = ARRAY [1,2,3]

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

xiong duan commented on CALCITE-5750:
-------------------------------------

This is caused by we can't extract the right Array type. It needs to extract the inside type by specific PgConnection and specific API. Like a special behavior in Postgresql. So I prepare to close it. 

 

> 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
>            Priority: Major
>
> 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)