aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results/natural-join.sql.out
blob: 43f2f9af61d9b7539fb4859f966597f2f01da987 (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
-- Automatically generated by SQLQueryTestSuite
-- Number of queries: 6


-- !query 0
create temporary view nt1 as select * from values
  ("one", 1),
  ("two", 2),
  ("three", 3)
  as nt1(k, v1)
-- !query 0 schema
struct<>
-- !query 0 output



-- !query 1
create temporary view nt2 as select * from values
  ("one", 1),
  ("two", 22),
  ("one", 5)
  as nt2(k, v2)
-- !query 1 schema
struct<>
-- !query 1 output



-- !query 2
SELECT * FROM nt1 natural join nt2 where k = "one"
-- !query 2 schema
struct<k:string,v1:int,v2:int>
-- !query 2 output
one	1	1
one	1	5


-- !query 3
SELECT * FROM nt1 natural left join nt2 order by v1, v2
-- !query 3 schema
struct<k:string,v1:int,v2:int>
-- !query 3 output
one	1	1
one	1	5
two	2	22
three	3	NULL


-- !query 4
SELECT * FROM nt1 natural right join nt2 order by v1, v2
-- !query 4 schema
struct<k:string,v1:int,v2:int>
-- !query 4 output
one	1	1
one	1	5
two	2	22


-- !query 5
SELECT count(*) FROM nt1 natural full outer join nt2
-- !query 5 schema
struct<count(1):bigint>
-- !query 5 output
4