[ https://issues.apache.org/jira/browse/CALCITE-6283?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated CALCITE-6283: ------------------------------------ Labels: pull-request-available (was: ) > 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 > Priority: Minor > Labels: pull-request-available > > 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)