You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Hongze Zhang (JIRA)" <ji...@apache.org> on 2019/04/24 08:04:00 UTC

[jira] [Created] (CALCITE-3017) Improve null handling of JsonValueExpressionOperator

Hongze Zhang created CALCITE-3017:
-------------------------------------

             Summary: Improve null handling of JsonValueExpressionOperator
                 Key: CALCITE-3017
                 URL: https://issues.apache.org/jira/browse/CALCITE-3017
             Project: Calcite
          Issue Type: Sub-task
            Reporter: Hongze Zhang
            Assignee: Hongze Zhang
             Fix For: 1.20.0


In Calcite's implementation, {{JsonValueExpressionOperator}} currently returns a null value no matter the argument is JSON NULL value or SQL NULL value. But in MySQL, some JSON functions behave differently on different null inputs. For instance for a MySQL JSON function {{JSON_STORAGE_SIZE}}, if we execute:
{code:sql}
SELECT JSON_STORAGE_SIZE(null), JSON_STORAGE_SIZE('null')
{code}
The result should be:
||JSON_STORAGE_SIZE(null)||JSON_STORAGE_SIZE('null')||
|null|2|

We should improve the operator a bit to support different behaviors.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)