This is an automated email from the ASF dual-hosted git repository.

zstan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git


The following commit(s) were added to refs/heads/main by this push:
     new cfc1711ee3 IGNITE-21951 Sql. Cover SQL T501(Enhanced EXISTS predicate) 
(#3752)
cfc1711ee3 is described below

commit cfc1711ee36c5913444b1e06c0d80f643924f82b
Author: Evgeniy Stanilovskiy <[email protected]>
AuthorDate: Wed May 15 10:41:35 2024 +0300

    IGNITE-21951 Sql. Cover SQL T501(Enhanced EXISTS predicate) (#3752)
---
 .../exists/test_enhanced_exists_predicate.test     | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git 
a/modules/sql-engine/src/integrationTest/sql/subquery/exists/test_enhanced_exists_predicate.test
 
b/modules/sql-engine/src/integrationTest/sql/subquery/exists/test_enhanced_exists_predicate.test
new file mode 100644
index 0000000000..2ef6b5c49b
--- /dev/null
+++ 
b/modules/sql-engine/src/integrationTest/sql/subquery/exists/test_enhanced_exists_predicate.test
@@ -0,0 +1,38 @@
+# name: sql/subquery/exists/test_enhanced_exists_predicate.test
+# description: T501 Enhanced EXISTS predicate
+# group: [exists]
+
+statement ok
+CREATE TABLE test (a INTEGER, b INTEGER);
+
+statement ok
+INSERT INTO test VALUES (11, 22)
+
+statement ok
+INSERT INTO test VALUES (12, 21)
+
+statement ok
+INSERT INTO test VALUES (13, 22)
+
+query II
+SELECT * FROM test WHERE EXISTS (SELECT a FROM test ts WHERE ts.a = test.a AND 
b>21) ORDER BY 1
+----
+11     22
+13     22
+
+query II
+SELECT * FROM test WHERE NOT EXISTS (SELECT a FROM test ts WHERE ts.a = test.a 
AND b>21) ORDER BY 1
+----
+12     21
+
+query II
+SELECT * FROM test WHERE EXISTS (SELECT a+1 FROM test ts WHERE ts.a = test.a 
AND b>21) ORDER BY 1
+----
+11     22
+13     22
+
+query II
+SELECT * FROM test WHERE EXISTS (SELECT * FROM test ts WHERE ts.a = test.a AND 
b>21) ORDER BY 1
+----
+11     22
+13     22

Reply via email to