We should not remove any limit from uncorrelated subquery. For Example ```sql -- should return nothing, but return all tuple of t if we remove limit from exists SELECT * FROM t WHERE EXISTS (SELECT * FROM t limit 0); -- should return the tuple with smallest c1 in t, -- but report error if we remove limit from scalar subquery SELECT * FROM t WHERE c1 = (SELECT * FROM t ORDER BY c1 LIMIT 1); ```
23 lines
404 B
Plaintext
23 lines
404 B
Plaintext
-- This file is automatically generated. You should know what you did if you want to edit this
|
|
-- !sql1 --
|
|
1001 1 1989
|
|
1001 2 1986
|
|
1002 3 1989
|
|
|
|
-- !sql2 --
|
|
1 1989
|
|
|
|
-- !sql3 --
|
|
1
|
|
2
|
|
3
|
|
|
|
-- !sql4 --
|
|
1
|
|
|
|
-- !uncorrelated_exists_with_limit_0 --
|
|
|
|
-- !uncorrelated_scalar_with_sort_and_limit --
|
|
true 15 1992 3021 11011920 0.000 true 9999-12-12 2015-04-02T00:00 3.141592653 20.456 string12345 701411834604692317
|
|
|