dawidwys commented on code in PR #3771:
URL: https://github.com/apache/calcite/pull/3771#discussion_r1594053574


##########
core/src/test/java/org/apache/calcite/test/JdbcTest.java:
##########
@@ -8056,6 +8056,71 @@ private void checkGetTimestamp(Connection con) throws 
SQLException {
         .returns("C1=OBJECT; C2=ARRAY; C3=INTEGER; C4=BOOLEAN\n");
   }
 
+  @Test void testJsonQuery() {
+    CalciteAssert.that()
+        .query("SELECT JSON_QUERY(v, '$.a') AS c1\n"
+            + ",JSON_QUERY(v, '$.a' RETURNING INTEGER ARRAY) AS c2\n"
+            + ",JSON_QUERY(v, '$.b' RETURNING INTEGER ARRAY EMPTY ARRAY ON 
ERROR) AS c3\n"
+            + ",JSON_QUERY(v, '$.b' RETURNING VARCHAR ARRAY WITH ARRAY 
WRAPPER) AS c4\n"
+            + "FROM (VALUES ('{\"a\": [1, 2],\"b\": \"[1, 2]\"}')) AS t(v)\n"
+            + "limit 10")

Review Comment:
   > not sure whether we need this limit since anyway only one line is in the 
result
   
   neither do I, truth be told I copied it from other similar cases which also 
produce less results



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