zhztheplayer commented on a change in pull request #1146: [CALCITE-2975] Add 
the JSON_REMOVE function
URL: https://github.com/apache/calcite/pull/1146#discussion_r274243602
 
 

 ##########
 File path: core/src/main/codegen/templates/Parser.jj
 ##########
 @@ -5379,6 +5381,34 @@ SqlCall JsonLengthFunctionCall() :
     }
 }
 
+SqlCall JsonRemoveFunctionCall() :
+{
+    final List<SqlNode> elements = new ArrayList<SqlNode>();
+    final SqlNode[] otherArgs = new SqlNode[1];
+    SqlNode e;
+    final Span span;
+}
+{
+    <JSON_REMOVE> { span = span(); }
+    <LPAREN> [
 
 Review comment:
   I'm always +1 to make the parser simpler. @julianhyde - but how do we deal 
with the case `JSON_REMOVE('[1, 2, 3]' FORMAT JSON, '$[1]')`? The `'[1, 2, 3]' 
FORMAT JSON` is not a standard function parameter currently.
   
   I have suggested to introduce JSON data type support in 
[CALCITE-2869](https://issues.apache.org/jira/browse/CALCITE-2869). By which we 
can unify the syntax `JsonValueExpression()` to `Expression()`. Should we do 
that first? Or is there any other way to simplify them?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to