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/05/09 07:12:00 UTC
[jira] [Commented] (CALCITE-3017) Improve null handling of
JsonValueExpressionOperator
[ https://issues.apache.org/jira/browse/CALCITE-3017?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16836153#comment-16836153 ]
Hongze Zhang commented on CALCITE-3017:
---------------------------------------
PR opened at https://github.com/apache/calcite/pull/1203.
> 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
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.20.0
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> 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)