blob: 1b8ddbe4c7211894e946d78d5179503886345970 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
-- Automatically generated by SQLQueryTestSuite
-- Number of queries: 4
-- !query 0
CREATE OR REPLACE TEMPORARY VIEW tbl_a AS VALUES (1, 1), (2, 1), (3, 6) AS T(c1, c2)
-- !query 0 schema
struct<>
-- !query 0 output
-- !query 1
CREATE OR REPLACE TEMPORARY VIEW tbl_b AS VALUES 1 AS T(c1)
-- !query 1 schema
struct<>
-- !query 1 output
-- !query 2
SELECT *
FROM tbl_a
LEFT ANTI JOIN tbl_b ON ((tbl_a.c1 = tbl_a.c2) IS NULL OR tbl_a.c1 = tbl_a.c2)
-- !query 2 schema
struct<c1:int,c2:int>
-- !query 2 output
2 1
3 6
-- !query 3
SELECT l.c1, l.c2
FROM tbl_a l
WHERE EXISTS (SELECT 1 FROM tbl_b r WHERE l.c1 = l.c2) OR l.c2 < 2
-- !query 3 schema
struct<c1:int,c2:int>
-- !query 3 output
1 1
2 1
|