You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2017/06/01 18:02:04 UTC

[jira] [Commented] (CALCITE-1804) Cannot assign NOT NULL array to NULLABLE array

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

Julian Hyde commented on CALCITE-1804:
--------------------------------------

You don't need a formatter - you can format manually. Just make sure your editor doesn't make spurious changes.

How about making canAssignFrom call itself recursively on the component type? Your code won't handle assigning an array of arrays of not null integers to an array of arrays of nullable integers, but the recursive solution would, and would be simpler.

Please make sure that the tests and validate/verify pass before submitting the PR.

> Cannot assign NOT NULL array to NULLABLE array
> ----------------------------------------------
>
>                 Key: CALCITE-1804
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1804
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.13.0
>            Reporter: Ankit Singhal
>            Assignee: Julian Hyde
>
> As ArraySqlType return a family of its own type and comparing families in SqlTypeUtil#canAssignFrom will compare the digest with Nullable constraints, which will not match when we are inserting an array in a nullable column.
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)