Ran Tao created CALCITE-5862:
--------------------------------
Summary: Incorrect NPE semantics of array function enabled in
Spark Library
Key: CALCITE-5862
URL: https://issues.apache.org/jira/browse/CALCITE-5862
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.34.0
Reporter: Ran Tao
Assignee: Ran Tao
when run
spark-sql (default)> select array(1, 2, 'Hi');
["1","2","Hi"]
calcite will cause {*}java.lang.NullPointerException: inferred array element
type{*}.
Spark supports both character and numeric types in the array, and the return
type is character.
In fact, calcite also allows both character and numeric types to exist in the
operand type checker, but there is no corresponding processing logic in the
return type inference, so an error is reported.
We should fix this bug.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)