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

Yu Xu reassigned CALCITE-7615:
------------------------------

    Assignee: Yu Xu

> MAP_CONCAT does not accept NULL as an argument
> ----------------------------------------------
>
>                 Key: CALCITE-7615
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7615
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.42.0
>            Reporter: Mihai Budiu
>            Assignee: Yu Xu
>            Priority: Minor
>
> MAP_CONCAT will throw if any argument is the NULL literal:
> {code:java}
> Function 'MAP_CONCAT' should all be of type map, but it is 'NULL' {code}
> The bug is in SqlLibraryOperators.deriveTypeMapConcat
> {code:java}
>         if (!SqlTypeUtil.isMap(operandType)) {
>           throw opBinding.newError(
>               RESOURCE.typesShouldAllBeMap(
>                   opBinding.getOperator().getName(),
>                   operandType.getFullTypeString()));
>         }{code}
> Moreover, the error message is not very good, it should say "arguments should 
> be all of type MAP".
> There is even a test in SqlOperatorTest for this case, which I think is wrong.



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

Reply via email to