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

Mihai Budiu resolved CALCITE-6723.
----------------------------------
    Fix Version/s: 1.39.0
       Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/c9288775300b44271beb2c4c0ffd1c54247412b4
Thank you for the review [~nobigo]

> 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
>              Labels: pull-request-available
>             Fix For: 1.39.0
>
>
> The type inference is implemented in 
> SqlLibraryOperators.arrayInsertReturnType.
> Since the spec of the function says that "if the index is larger than the 
> array, the array is padded with NULL values", it implies that the type of the 
> result is always an array with nullable elements, irrespective of the type of 
> the elements of the input array.
> Currently the type inference preserves the element type in the result.



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

Reply via email to