aboutsummaryrefslogtreecommitdiff
path: root/sql/core/src/test/resources/sql-tests/results/columnresolution-views.sql.out
blob: 616421d6f2b28ac7b6c6d614caee53df0b927bb0 (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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
-- Automatically generated by SQLQueryTestSuite
-- Number of queries: 17


-- !query 0
CREATE OR REPLACE TEMPORARY VIEW view1 AS SELECT 2 AS i1
-- !query 0 schema
struct<>
-- !query 0 output



-- !query 1
SELECT view1.* FROM view1
-- !query 1 schema
struct<i1:int>
-- !query 1 output
2


-- !query 2
SELECT * FROM view1
-- !query 2 schema
struct<i1:int>
-- !query 2 output
2


-- !query 3
SELECT view1.i1 FROM view1
-- !query 3 schema
struct<i1:int>
-- !query 3 output
2


-- !query 4
SELECT i1 FROM view1
-- !query 4 schema
struct<i1:int>
-- !query 4 output
2


-- !query 5
SELECT a.i1 FROM view1 AS a
-- !query 5 schema
struct<i1:int>
-- !query 5 output
2


-- !query 6
SELECT i1 FROM view1 AS a
-- !query 6 schema
struct<i1:int>
-- !query 6 output
2


-- !query 7
DROP VIEW view1
-- !query 7 schema
struct<>
-- !query 7 output



-- !query 8
CREATE OR REPLACE GLOBAL TEMPORARY VIEW view1 as SELECT 1 as i1
-- !query 8 schema
struct<>
-- !query 8 output



-- !query 9
SELECT * FROM global_temp.view1
-- !query 9 schema
struct<i1:int>
-- !query 9 output
1


-- !query 10
SELECT global_temp.view1.* FROM global_temp.view1
-- !query 10 schema
struct<>
-- !query 10 output
org.apache.spark.sql.AnalysisException
cannot resolve 'global_temp.view1.*' give input columns 'i1';


-- !query 11
SELECT i1 FROM global_temp.view1
-- !query 11 schema
struct<i1:int>
-- !query 11 output
1


-- !query 12
SELECT global_temp.view1.i1 FROM global_temp.view1
-- !query 12 schema
struct<>
-- !query 12 output
org.apache.spark.sql.AnalysisException
cannot resolve '`global_temp.view1.i1`' given input columns: [i1]; line 1 pos 7


-- !query 13
SELECT view1.i1 FROM global_temp.view1
-- !query 13 schema
struct<i1:int>
-- !query 13 output
1


-- !query 14
SELECT a.i1 FROM global_temp.view1 AS a
-- !query 14 schema
struct<i1:int>
-- !query 14 output
1


-- !query 15
SELECT i1 FROM global_temp.view1 AS a
-- !query 15 schema
struct<i1:int>
-- !query 15 output
1


-- !query 16
DROP VIEW global_temp.view1
-- !query 16 schema
struct<>
-- !query 16 output