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 by 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



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to