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

ASF GitHub Bot commented on PHOENIX-628:
----------------------------------------

ranganathg commented on code in PR #1780:
URL: https://github.com/apache/phoenix/pull/1780#discussion_r1448645884


##########
phoenix-core-client/src/main/java/org/apache/phoenix/compile/ProjectionCompiler.java:
##########
@@ -641,19 +710,32 @@ public <T> T accept(ExpressionVisitor<T> visitor) {
             return null;
         }
     }
-    private static void 
serailizeArrayIndexInformationAndSetInScan(StatementContext context, 
List<Expression> arrayKVFuncs,
-            List<KeyValueColumnExpression> arrayKVRefs) {
+
+    static class JsonPathExpression extends ArrayIndexExpression {

Review Comment:
   Actually JsonPath and ArrayIndex expressions in a way look identical like 
for eg: ARRAY_ELEM(column, index) and JSON_VALUE(column, Path). By identical I 
don't mean function name and number of params but like operations on a map. one 
is my index and other is by path(or key). Actually there wasn't really a need 
to have a JsonPathExpression separately as ArrayIndexExpression has all the 
logic required - I have added JsonPathExp just to have a code level separation 
in case we happen to make any modifications in the future we can only modify 
JsonPath without changing ArrayIndex.
   I'm not sure if we need to extend from ScalarFunction for JsonPathExp. It 
can be from BaseTerminalExpression but then would be a complete copy of 
ArrayIndexExp





> Support native JSON data type
> -----------------------------
>
>                 Key: PHOENIX-628
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-628
>             Project: Phoenix
>          Issue Type: Task
>    Affects Versions: 5.1.4
>            Reporter: James R. Taylor
>            Assignee: Ranganath Govardhanagiri
>              Labels: JSON, Java, SQL
>             Fix For: 4.4.1, 5.2.0
>
>         Attachments: JSON Support for Phoenix.docx, Screen Shot 2022-02-02 at 
> 12.23.24 PM.png, image-2023-12-07-11-26-56-198.png
>
>
> MongoDB and Postgres do some interesting things with JSON. We should look at 
> adding similar support. For a detailed description, see JSONB support in 
> Postgres: 
> [http://www.craigkerstiens.com/2014/03/24/Postgres-9.4-Looking-up]
> [http://www.depesz.com/2014/03/25/waiting-for-9-4-introduce-jsonb-a-structured-format-for-storing-json/]
> [http://michael.otacoo.com/postgresql-2/manipulating-jsonb-data-with-key-unique/]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to