[
https://issues.apache.org/jira/browse/PHOENIX-1661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14372849#comment-14372849
]
ASF GitHub Bot commented on PHOENIX-1661:
-----------------------------------------
GitHub user ictwanglei opened a pull request:
https://github.com/apache/phoenix/pull/53
PHOENIX-1661 Add ArrayToJson function to support build-in function for JSON
a subtask of PHOENIX-1661:support build-in function for JSON
create ArrayToJsonFunction.java to support ArrayToJson function
create ArrayToJsonFunctionTest.java to test it
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/ictwanglei/phoenix master
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/phoenix/pull/53.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 #53
----
commit 26383070e5980697a0de1193c069692a8107b7c2
Author: ictwanglei <[email protected]>
Date: 2015-03-21T15:32:40Z
Create ArrayToJsonFunction.java
add a function to support "ArrayToJson" function as a build-in function for
JSON
commit 2c63494f99267fbcd0b7e52be76a1dc0154e306a
Author: ictwanglei <[email protected]>
Date: 2015-03-21T15:34:57Z
Create ArrayToJsonFunctionTest.java
a simple test for testing ArrayToJsonFunction
----
> Implement built-in functions for JSON
> -------------------------------------
>
> Key: PHOENIX-1661
> URL: https://issues.apache.org/jira/browse/PHOENIX-1661
> Project: Phoenix
> Issue Type: Bug
> Reporter: James Taylor
> Labels: JSON, Java, SQL, gsoc2015, mentor
> Attachments: PhoenixJSONSpecification-First-Draft.pdf
>
>
> Take a look at the JSON built-in functions that are implemented in Postgres
> (http://www.postgresql.org/docs/9.3/static/functions-json.html) and implement
> the same for Phoenix in Java following this guide:
> http://phoenix-hbase.blogspot.com/2013/04/how-to-add-your-own-built-in-function.html
> Examples of functions include ARRAY_TO_JSON, ROW_TO_JSON, TO_JSON, etc. The
> implementation of these built-in functions will be impacted by how JSON is
> stored in Phoenix. See PHOENIX-628. An initial implementation could work off
> of a simple text-based JSON representation and then when a native JSON type
> is implemented, they could be reworked to be more efficient.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)