You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "xtern (via GitHub)" <gi...@apache.org> on 2024/04/09 07:58:49 UTC

[PR] IGNITE-21916 Sql. Cover SQL T828 (JSON_QUERY) feature by tests [ignite-3]

xtern opened a new pull request, #3577:
URL: https://github.com/apache/ignite-3/pull/3577

   https://issues.apache.org/jira/browse/IGNITE-21916


-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-21916 Sql. Cover SQL T828 (JSON_QUERY) feature by tests [ignite-3]

Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #3577:
URL: https://github.com/apache/ignite-3/pull/3577#discussion_r1558952708


##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItSqlOperatorsTest.java:
##########
@@ -326,6 +331,25 @@ public void testJson() {
         assertExpression("'{\"a\":1}' IS NOT JSON OBJECT").returns(false).check();
         assertExpression("'[1, 2]' IS NOT JSON ARRAY").returns(false).check();
         assertExpression("'1' IS NOT JSON SCALAR").returns(false).check();
+
+        // TODO https://issues.apache.org/jira/browse/IGNITE-20163
+        // assertExpression("'{\"a\":1}' FORMAT JSON").check();
+    }
+
+    @Test
+    @SuppressWarnings("ThrowableNotThrown")

Review Comment:
   it looks like our gap in support of JSON. I suggest to create a ticket to support it, rewrite test  and mute it under the newly created ticket



-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-21916 Sql. Cover SQL T828 (JSON_QUERY) feature by tests [ignite-3]

Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern merged PR #3577:
URL: https://github.com/apache/ignite-3/pull/3577


-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-21916 Sql. Cover SQL T828 (JSON_QUERY) feature by tests [ignite-3]

Posted by "ygerzhedovich (via GitHub)" <gi...@apache.org>.
ygerzhedovich commented on code in PR #3577:
URL: https://github.com/apache/ignite-3/pull/3577#discussion_r1558953475


##########
modules/sql-engine/src/integrationTest/sql/function/json/test_json.test:
##########
@@ -26,3 +26,28 @@ query R
 SELECT JSON_ARRAY ('test', 1, 4.2)
 ----
 ["test",1,4.2]
+
+statement ok
+create table t(id int primary key, name varchar, age int);
+
+statement ok
+insert into t values (0, 'Alex', 32), (1, 'Maria', 27);
+
+query T
+select json_object('Name': name, 'age': age) from t
+----
+{"age":32,"Name":"Alex"}
+{"age":27,"Name":"Maria"}
+
+query T
+select json_array(name, age) from t
+----
+["Alex",32]
+["Maria",27]
+
+# Note nested object construction fails with NullPointerException

Review Comment:
   it should be muted with JIRA ticket



-- 
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: notifications-unsubscribe@ignite.apache.org

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


Re: [PR] IGNITE-21916 Sql. Cover SQL T828 (JSON_QUERY) feature by tests [ignite-3]

Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern commented on code in PR #3577:
URL: https://github.com/apache/ignite-3/pull/3577#discussion_r1559248441


##########
modules/sql-engine/src/integrationTest/java/org/apache/ignite/internal/sql/engine/ItSqlOperatorsTest.java:
##########
@@ -326,6 +331,25 @@ public void testJson() {
         assertExpression("'{\"a\":1}' IS NOT JSON OBJECT").returns(false).check();
         assertExpression("'[1, 2]' IS NOT JSON ARRAY").returns(false).check();
         assertExpression("'1' IS NOT JSON SCALAR").returns(false).check();
+
+        // TODO https://issues.apache.org/jira/browse/IGNITE-20163
+        // assertExpression("'{\"a\":1}' FORMAT JSON").check();
+    }
+
+    @Test
+    @SuppressWarnings("ThrowableNotThrown")

Review Comment:
   Fixed, thanks



##########
modules/sql-engine/src/integrationTest/sql/function/json/test_json.test:
##########
@@ -26,3 +26,28 @@ query R
 SELECT JSON_ARRAY ('test', 1, 4.2)
 ----
 ["test",1,4.2]
+
+statement ok
+create table t(id int primary key, name varchar, age int);
+
+statement ok
+insert into t values (0, 'Alex', 32), (1, 'Maria', 27);
+
+query T
+select json_object('Name': name, 'age': age) from t
+----
+{"age":32,"Name":"Alex"}
+{"age":27,"Name":"Maria"}
+
+query T
+select json_array(name, age) from t
+----
+["Alex",32]
+["Maria",27]
+
+# Note nested object construction fails with NullPointerException

Review Comment:
   Fixed, thanks



-- 
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: notifications-unsubscribe@ignite.apache.org

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