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

Mihai Budiu resolved CALCITE-6283.
----------------------------------
    Resolution: Fixed

Fixed in 
https://github.com/apache/calcite/commit/90beb01b0713a010167aeb2c810ffebccf3aa3e1

> Function ARRAY_APPEND with a NULL array argument crashes with 
> NullPointerException
> ----------------------------------------------------------------------------------
>
>                 Key: CALCITE-6283
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6283
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.36.0
>            Reporter: Mihai Budiu
>            Assignee: Mihai Budiu
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 1.37.0
>
>
> The following test added to SqlOperatorTest:
> {code:java}
> f.checkNull("array_append(null, 2)");
> {code}
> causes Calcite to crash with the following stack trace:
> {code}
> java.lang.NullPointerException: componentType is null for NULL
>       at java.base/java.util.Objects.requireNonNull(Objects.java:347)
>       at 
> org.apache.calcite.sql.type.NonNullableAccessors.getComponentTypeOrThrow(NonNullableAccessors.java:52)
>       at 
> org.apache.calcite.sql.type.ArrayElementOperandTypeChecker.checkOperandTypes(ArrayElementOperandTypeChecker.java:49)
>       at 
> org.apache.calcite.sql.SqlOperator.checkOperandTypes(SqlOperator.java:761)
>       at 
> org.apache.calcite.sql.SqlOperator.validateOperands(SqlOperator.java:498)
>       at org.apache.calcite.sql.SqlFunction.deriveType(SqlFunction.java:347)
>       at org.apache.calcite.sql.SqlFunction.deriveType(SqlFunction.java:231)
> {code}



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

Reply via email to