[
https://issues.apache.org/jira/browse/CALCITE-6723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17904318#comment-17904318
]
Mihai Budiu commented on CALCITE-6723:
--------------------------------------
[~nobigo] your change in [CALCITE-6711] should have caught this in the
following SqlOperatorTest for array_insert:
{code:java}
f1.checkNull("array_insert(array[1], cast(null as integer), 4)");
{code}
> Type inference for ARRAY_INSERT function is incorrect
> -----------------------------------------------------
>
> Key: CALCITE-6723
> URL: https://issues.apache.org/jira/browse/CALCITE-6723
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.38.0
> Reporter: Mihai Budiu
> Assignee: Mihai Budiu
> Priority: Minor
>
> The type inference is implemented in
> SqlLibraryOperators.arrayInsertReturnType.
> This function computes the return type as a function of the types of
> arguments 0 and 2.
> However, if argument 1 is nullable, the result type has to be nullable as
> well.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)