You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CREATE TABLE t3(t3_id INT PRIMARY KEY, t3_name TEXT, t3_int INT) AS VALUES
54
+
(11, 'e', 3),
55
+
(22, 'f', 1),
56
+
(44, 'g', 3),
57
+
(55, 'h', 3);
58
+
52
59
statement ok
53
60
CREATE EXTERNAL TABLE IF NOT EXISTS customer (
54
61
c_custkey BIGINT,
@@ -419,6 +426,17 @@ SELECT t1_id, t1_name, t1_int FROM t1 order by t1_int in (SELECT t2_int FROM t2
419
426
statement error DataFusion error: check_analyzed_plan\ncaused by\nError during planning: Correlated scalar subquery must be aggregated to return at most one row
420
427
SELECT t1_id, (SELECT t2_int FROM t2 WHERE t2.t2_int = t1.t1_int) as t2_int from t1
421
428
429
+
#non_aggregated_correlated_scalar_subquery_unique
430
+
query II rowsort
431
+
SELECT t1_id, (SELECT t3_int FROM t3 WHERE t3.t3_id = t1.t1_id) as t3_int from t1
432
+
----
433
+
11 3
434
+
22 1
435
+
33 NULL
436
+
44 3
437
+
438
+
439
+
#non_aggregated_correlated_scalar_subquery
422
440
statement error DataFusion error: check_analyzed_plan\ncaused by\nError during planning: Correlated scalar subquery must be aggregated to return at most one row
423
441
SELECT t1_id, (SELECT t2_int FROM t2 WHERE t2.t2_int = t1_int group by t2_int) as t2_int from t1
0 commit comments