[ 
https://issues.apache.org/jira/browse/PHOENIX-1710?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14499054#comment-14499054
 ] 

Aakash Pradeep commented on PHOENIX-1710:
-----------------------------------------

Sorry for my misunderstanding!!  The behavior of json_extact_path_text() is 
same as operator "#>>"   for Postgres, earlier I was under impression that they 
differ for Json Array. 

json_extract_path and #>> specify the index in same way as key, as I explained 
in last comment in option 1. 

So we should follow the option 1 for Phoenix  to be consistent.

> Implement the json_extract_path_text built-in function
> ------------------------------------------------------
>
>                 Key: PHOENIX-1710
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-1710
>             Project: Phoenix
>          Issue Type: Sub-task
>            Reporter: James Taylor
>            Assignee: Aakash Pradeep
>
> Implement the json_extract_path_text modeled after the Postgres function. 
> This function returns JSON pointed to by the path elements argument. In 
> Phoenix, it could be implemented like this:
> {code}
> VARCHAR json_extract_path_text (VARCHAR json, VARCHAR ARRAY path_elems paths)
> {code}
> For example:
> {code}
> SELECT json_extract_path_text(json_col, ARRAY['f4','f6']) FROM my_table;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to