You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tajo.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/08/13 05:06:47 UTC
[jira] [Commented] (TAJO-1754) Implement several functions to
handle json array
[ https://issues.apache.org/jira/browse/TAJO-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14694610#comment-14694610 ]
ASF GitHub Bot commented on TAJO-1754:
--------------------------------------
GitHub user jihoonson opened a pull request:
https://github.com/apache/tajo/pull/687
TAJO-1754: Implement several functions to handle json array
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/jihoonson/tajo-2 TAJO-1754
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tajo/pull/687.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #687
----
commit fbc212d85880b11d5f0c3f634970d202fb2fbd67
Author: Jihoon Son <ji...@apache.org>
Date: 2015-08-13T03:05:32Z
TAJO-1754
----
> Implement several functions to handle json array
> ------------------------------------------------
>
> Key: TAJO-1754
> URL: https://issues.apache.org/jira/browse/TAJO-1754
> Project: Tajo
> Issue Type: Sub-task
> Components: Function/UDF
> Reporter: Jihoon Son
> Assignee: Jihoon Son
> Fix For: 0.11.0
>
>
> h4. json_array_get
> {noformat}
> SELECT json_array_get('["a", "b", "c"]', 0); => "a"
> SELECT json_array_get('["a", "b", "c"]', 1); => "b"
> SELECT json_array_get('["c", "b", "a"]', -1); => "a"
> SELECT json_array_get('["c", "b", "a"]', -2); => "b"
> SELECT json_array_get('[]', 0); => null
> SELECT json_array_get('["a", "b", "c"]', 10); => null
> SELECT json_array_get('["c", "b", "a"]', -10); => null
> {noformat}
> h4. json_array_contains
> {noformat}
> SELECT json_array_contains('[1, 2, 3]', 2);
> {noformat}
> h4. json_array_length
> {noformat}
> SELECT json_array_length('[1, 2, 3]');
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)