abhishekagarwal87 commented on code in PR #15521:
URL: https://github.com/apache/druid/pull/15521#discussion_r1420215382


##########
processing/src/main/java/org/apache/druid/query/expression/NestedDataExpressions.java:
##########
@@ -591,6 +594,120 @@ public ExpressionType getOutputType(InputBindingInspector 
inspector)
     }
   }
 
+  public static class JsonQueryArrayExprMacro implements 
ExprMacroTable.ExprMacro
+  {
+    public static final String NAME = "json_query_array";
+
+    @Override
+    public String name()
+    {
+      return NAME;
+    }
+
+    @Override
+    public Expr apply(List<Expr> args)
+    {
+      if (args.get(1).isLiteral()) {

Review Comment:
   we should add some validation on args count. 



##########
sql/src/main/java/org/apache/druid/sql/calcite/planner/DruidSqlValidator.java:
##########
@@ -80,6 +85,26 @@ public void validateCall(SqlCall call, SqlValidatorScope 
scope)
     super.validateCall(call, scope);
   }
 
+  @Override
+  public SqlTypeMappingRule getTypeMappingRule()

Review Comment:
   can you add a comment here as to why this is overridden? 



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to