Changeset: 15fb95ac4b0c for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=15fb95ac4b0c
Modified Files:
sql/test/subquery/Tests/subquery3.sql
Branch: Nov2019
Log Message:
Issues with exists operator
diffs (39 lines):
diff --git a/sql/test/subquery/Tests/subquery3.sql
b/sql/test/subquery/Tests/subquery3.sql
--- a/sql/test/subquery/Tests/subquery3.sql
+++ b/sql/test/subquery/Tests/subquery3.sql
@@ -34,6 +34,35 @@ GROUP BY col1, col2, col5;
-- 1 0
SELECT
+ EXISTS (SELECT col1 WHERE TRUE),
+ EXISTS (SELECT col1 WHERE FALSE),
+ EXISTS (SELECT col1 WHERE NULL),
+ NOT EXISTS (SELECT col1 WHERE TRUE),
+ NOT EXISTS (SELECT col1 WHERE FALSE),
+ NOT EXISTS (SELECT col1 WHERE NULL)
+FROM another_T t1;
+ -- True False False False True True
+ -- True False False False True True
+ -- True False False False True True
+ -- True False False False True True
+
+SELECT
+ EXISTS (SELECT AVG(col1) WHERE TRUE),
+ EXISTS (SELECT AVG(col1) WHERE FALSE),
+ EXISTS (SELECT AVG(col1) WHERE NULL),
+ NOT EXISTS (SELECT AVG(col1) WHERE TRUE),
+ NOT EXISTS (SELECT AVG(col1) WHERE FALSE),
+ NOT EXISTS (SELECT AVG(col1) WHERE NULL)
+FROM another_T t1;
+ -- The outputs depends if the correlation happens in either inside the
inner query or the outer query. However some columns output wrong in MonetDB.
+ -- True False False False True True (1x or 4x)
+
+SELECT
+ EXISTS (SELECT RANK() OVER (PARTITION BY SUM(DISTINCT col5)))
+FROM another_T t1;
+ -- True
+
+SELECT
(SELECT AVG(col1) OVER (PARTITION BY col5 ORDER BY col1 ROWS UNBOUNDED
PRECEDING) FROM tbl_ProductSales)
FROM another_T t1; --error, more than one row returned by a subquery used as
an expression
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list