mihaibudiu commented on code in PR #3694:
URL: https://github.com/apache/calcite/pull/3694#discussion_r1492920787


##########
testkit/src/main/java/org/apache/calcite/sql/parser/SqlParserTest.java:
##########
@@ -8815,6 +8815,10 @@ private static Consumer<List<? extends Throwable>> 
checkWarnings(
         .ok("JSON_OBJECT(KEY 'foo' VALUE "
             + "JSON_OBJECT(KEY 'foo' VALUE 'bar' NULL ON NULL) "
             + "FORMAT JSON NULL ON NULL)");
+    expr("json_object('foo', 'bar')")

Review Comment:
   how about some other tests, e.g., with an odd number of elements?



##########
core/src/main/java/org/apache/calcite/runtime/CalciteResource.java:
##########
@@ -112,6 +112,9 @@ public interface CalciteResource {
   @BaseMessage("Illegal identifier '':''. Was expecting ''VALUE''")
   ExInst<CalciteException> illegalColon();
 
+  @BaseMessage("Illegal identifier '',''. Was expecting ''VALUE''")

Review Comment:
   Comma is not really an identifier.  Maybe "symbol".
   Yes, the previous message is probably wrong too.
   



##########
core/src/main/codegen/templates/Parser.jj:
##########
@@ -6767,7 +6773,8 @@ SqlCall JsonObjectFunctionCall() :
 }
 {
     <JSON_OBJECT> { span = span(); }
-    <LPAREN> [
+    <LPAREN>

Review Comment:
   why this change?



-- 
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: commits-unsubscr...@calcite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to