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/03/04 04:53:00 UTC
[jira] [Resolved] (CALCITE-2881) Add the JSON_PRETTY function
[ https://issues.apache.org/jira/browse/CALCITE-2881?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hongze Zhang resolved CALCITE-2881.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.19.0
Fixed in [7c905ff3263bcc6cec826789305f1be9fba0962e|https://gitbox.apache.org/repos/asf?p=calcite.git;a=commit;h=7c905ff3263bcc6cec826789305f1be9fba0962e], thanks for your contribution, [~ritesh.kapoor]!
> Add the JSON_PRETTY function
> ----------------------------
>
> Key: CALCITE-2881
> URL: https://issues.apache.org/jira/browse/CALCITE-2881
> Project: Calcite
> Issue Type: Sub-task
> Reporter: Ritesh
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.19.0
>
> Time Spent: 1h 20m
> Remaining Estimate: 0h
>
> ```
> JSON_PRETTY(*json_doc*)
> ```
> Returns the pretty formatted JSON document. Returns `NULL` if any argument is `NULL` or if JSON document is invalid.
> Example Sql:
> ```sql
> SELECT JSON_PRETTY(v) AS c1
> FROM (VALUES ('{"a": [10, true],"b": [10, true]}')) as t(v)
> limit 10
> ```
> Result:
> c1
> { "a" : [ 10, true ], "b" : [ 10, true ] }
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)