You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Viliam Durina (Jira)" <ji...@apache.org> on 2021/09/17 18:56:00 UTC

[jira] [Updated] (CALCITE-4785) The parser allows multiple ON ERROR or ON EMPTY clauses for JSON_QUERY and JSON_VALUE

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

Viliam Durina updated CALCITE-4785:
-----------------------------------
    Description: 
The following expression parses succesfully:

{{JSON_QUERY('bad-json', '$' DEFAULT 1 ON ERROR DEFAULT 2 ON ERROR)}}

The 2nd ON ERROR clause overrides the 1st one and the expression returns {{2}}. Instead, an error should be thrown.

  was:
The following expression parses succesfully:

{{JSON_QUERY('bad-json', '$' DEFAULT 1 ON ERROR DEFAULT 2 ON ERROR)}}

The 2nd ON ERROR clause overrides the 1st one and it returns {{2}}. Instead, an error should be thrown.


> The parser allows multiple ON ERROR or ON EMPTY clauses for JSON_QUERY and JSON_VALUE
> -------------------------------------------------------------------------------------
>
>                 Key: CALCITE-4785
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4785
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.27.0
>            Reporter: Viliam Durina
>            Priority: Minor
>
> The following expression parses succesfully:
> {{JSON_QUERY('bad-json', '$' DEFAULT 1 ON ERROR DEFAULT 2 ON ERROR)}}
> The 2nd ON ERROR clause overrides the 1st one and the expression returns {{2}}. Instead, an error should be thrown.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)