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

Hongze Zhang resolved CALCITE-2975.
-----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.20.0

Fixed in [999c41d5ff893a30b2622442a448102c72fc475e 
|https://github.com/apache/calcite/commit/999c41d5ff893a30b2622442a448102c72fc475e].
 Thanks [~x1q1j1]!

> Implement JSON_REMOVE function
> ------------------------------
>
>                 Key: CALCITE-2975
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2975
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: Forward Xu
>            Assignee: Forward Xu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.20.0
>
>          Time Spent: 3.5h
>  Remaining Estimate: 0h
>
> JSON_REMOVE(json_doc, path[, path] ...)
> Removes data from a JSON document and returns the result. Returns NULL if any 
> argument is NULL. An error occurs if the json_doc argument is not a valid 
> JSON document or any path argument is not a valid path expression or is $ or 
> contains a * or ** wildcard.
> The path arguments are evaluated left to right. The document produced by 
> evaluating one path becomes the new value against which the next path is 
> evaluated.
> It is not an error if the element to be removed does not exist in the 
> document; in that case, the path does not affect the document.
> JSON_REMOVE SQL:
> {code:java}
> SELECT JSON_REMOVE(v, '$[1]') AS c1
>  FROM (VALUES ('["a", ["b", "c"], "d"]')) AS t(v);
> {code}
> RESULT:
> ||c1||
> |["a", "d"]|



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

Reply via email to