You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "jackylau (Jira)" <ji...@apache.org> on 2023/04/25 02:46:00 UTC

[jira] [Updated] (CALCITE-5674) cast expr to target type should respect nullable when the type is array

     [ https://issues.apache.org/jira/browse/CALCITE-5674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jackylau updated CALCITE-5674:
------------------------------
    Description: 
{code:java}
// code placeholder
sql("select cast(array[1,null,2] as int array) from (values (1))")
.columnType("INTEGER NOT NULL ARRAY NOT NULL");

it is not correct, it should return INTEGER ARRAY NOT NULL  {code}

> cast expr to target type should respect nullable when the type is array
> -----------------------------------------------------------------------
>
>                 Key: CALCITE-5674
>                 URL: https://issues.apache.org/jira/browse/CALCITE-5674
>             Project: Calcite
>          Issue Type: Improvement
>    Affects Versions: 1.35.0
>            Reporter: jackylau
>            Priority: Major
>             Fix For: 1.35.0
>
>
> {code:java}
> // code placeholder
> sql("select cast(array[1,null,2] as int array) from (values (1))")
> .columnType("INTEGER NOT NULL ARRAY NOT NULL");
> it is not correct, it should return INTEGER ARRAY NOT NULL  {code}



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