julianhyde commented on a change in pull request #1146: [CALCITE-2975] Add the
JSON_REMOVE function
URL: https://github.com/apache/calcite/pull/1146#discussion_r274074700
##########
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:
Do we really need to change the parser for every single JSON_xxx function? I
don't think so.
Even if JSON values have radically different syntax than regular SQL values
- and I'm skeptical - many JSON functions have normal function syntax "f(v1,
v2, ...)". For such functions, it's better to parse them using generic function
syntax. Then the validation happens in the validator, which gives better error
messages.
----------------------------------------------------------------
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