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 f5e912a3ad IGNITE-21960 Sql. Extend test coverage for SQL
E061-07(Quantified comparison predicate) (#3867)
f5e912a3ad is described below
commit f5e912a3adfbb10678388699024d4aa8a9bcd460
Author: Evgeniy Stanilovskiy <[email protected]>
AuthorDate: Fri Jun 7 14:08:10 2024 +0300
IGNITE-21960 Sql. Extend test coverage for SQL E061-07(Quantified
comparison predicate) (#3867)
---
.../sql/subquery/any_all/test_any_all.test | 7 +++++++
.../sql/subquery/any_all/test_correlated_any_all.test | 15 +++++++++++++++
2 files changed, 22 insertions(+)
diff --git
a/modules/sql-engine/src/integrationTest/sql/subquery/any_all/test_any_all.test
b/modules/sql-engine/src/integrationTest/sql/subquery/any_all/test_any_all.test
index f2f12582df..5d8252c57f 100644
---
a/modules/sql-engine/src/integrationTest/sql/subquery/any_all/test_any_all.test
+++
b/modules/sql-engine/src/integrationTest/sql/subquery/any_all/test_any_all.test
@@ -1,5 +1,6 @@
# name: test/sql/subquery/any_all/test_any_all.test
# description: Test ANY/ALL queries
+# feature: SQL E061-07(Basic predicates and search conditions. Quantified
comparison predicate)
# group: [any_all]
statement ok
@@ -11,12 +12,18 @@ CREATE TABLE integers(i INTEGER)
statement ok
INSERT INTO integers VALUES (1), (2), (3)
+# <row value constructor predicand> is a single <common value expression>
# ANY is like EXISTS without NULL values
query T
SELECT 2 > ANY(SELECT * FROM integers)
----
true
+query T
+SELECT 2 > SOME(SELECT * FROM integers)
+----
+true
+
query T
SELECT 1 > ANY(SELECT * FROM integers)
----
diff --git
a/modules/sql-engine/src/integrationTest/sql/subquery/any_all/test_correlated_any_all.test
b/modules/sql-engine/src/integrationTest/sql/subquery/any_all/test_correlated_any_all.test
index f26c48aa2e..d3c05f2932 100644
---
a/modules/sql-engine/src/integrationTest/sql/subquery/any_all/test_correlated_any_all.test
+++
b/modules/sql-engine/src/integrationTest/sql/subquery/any_all/test_correlated_any_all.test
@@ -1,6 +1,7 @@
# name: test/sql/subquery/any_all/test_correlated_any_all.test
# description: Test correlated ANY/ALL subqueries
# group: [any_all]
+# feature: SQL E061-07(Basic predicates and search conditions. Quantified
comparison predicate)
# Ignore https://issues.apache.org/jira/browse/IGNITE-19402
statement ok
@@ -21,6 +22,14 @@ true
true
false
+query T
+SELECT i=SOME(SELECT i FROM integers WHERE i=i1.i) FROM integers i1 ORDER BY i;
+----
+true
+true
+true
+false
+
query T
SELECT i>ALL(SELECT (i+i1.i-1)/2 FROM integers WHERE i IS NOT NULL) FROM
integers i1 ORDER BY i;
----
@@ -59,6 +68,12 @@ SELECT i FROM integers i1 WHERE i>ANY(SELECT i FROM integers
WHERE i<>i1.i) ORDE
2
3
+query I
+SELECT i FROM integers i1 WHERE i<SOME(SELECT i FROM integers WHERE i<>i1.i)
ORDER BY i;
+----
+1
+2
+
query I
SELECT i FROM integers i1 WHERE i>ALL(SELECT (i+i1.i-1)/2 FROM integers WHERE
i IS NOT NULL) ORDER BY i;
----