Skip to content

Commit 979bfb6

Browse files
committed
add the gold file
1 parent d5e450a commit 979bfb6

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
-- Automatically generated by SQLQueryTestSuite
2+
-- Number of queries: 10
3+
4+
5+
-- !query 0
6+
CREATE OR REPLACE TEMPORARY VIEW testData AS SELECT * FROM VALUES
7+
(1, "1"), (2, "2"), (3, "3"), (4, "4"), (5, "5"), (6, "6")
8+
AS testData(key, value)
9+
-- !query 0 schema
10+
struct<>
11+
-- !query 0 output
12+
13+
14+
15+
-- !query 1
16+
CREATE OR REPLACE TEMPORARY VIEW testData2 AS SELECT * FROM VALUES
17+
(1, 1), (1, 2), (2, 1), (2, 2), (3, 1), (3, 2)
18+
AS testData2(a, b)
19+
-- !query 1 schema
20+
struct<>
21+
-- !query 1 output
22+
23+
24+
25+
-- !query 2
26+
SELECT `(a)?+.+` FROM testData2 WHERE a = 1
27+
-- !query 2 schema
28+
struct<>
29+
-- !query 2 output
30+
org.apache.spark.sql.AnalysisException
31+
cannot resolve '```(a)?+.+```' given input columns: [a, b]; line 1 pos 7
32+
33+
34+
-- !query 3
35+
SELECT t.`(a)?+.+` FROM testData2 t WHERE a = 1
36+
-- !query 3 schema
37+
struct<>
38+
-- !query 3 output
39+
org.apache.spark.sql.AnalysisException
40+
cannot resolve '`t.``(a)?+.+```' given input columns: [a, b]; line 1 pos 7
41+
42+
43+
-- !query 4
44+
set spark.sql.parser.quotedRegexColumnNames=true
45+
-- !query 4 schema
46+
struct<key:string,value:string>
47+
-- !query 4 output
48+
spark.sql.parser.quotedRegexColumnNames true
49+
50+
51+
-- !query 5
52+
SELECT `(a)?+.+` FROM testData2 WHERE a = 1
53+
-- !query 5 schema
54+
struct<b:int>
55+
-- !query 5 output
56+
1
57+
2
58+
59+
60+
-- !query 6
61+
SELECT t.`(a)?+.+` FROM testData2 t WHERE a = 1
62+
-- !query 6 schema
63+
struct<b:int>
64+
-- !query 6 output
65+
1
66+
2
67+
68+
69+
-- !query 7
70+
SELECT p.`(key)?+.+`, b, testdata2.`(b)?+.+` FROM testData p join testData2 ON p.key = testData2.a WHERE key < 3
71+
-- !query 7 schema
72+
struct<value:string,b:int,a:int>
73+
-- !query 7 output
74+
1 1 1
75+
1 2 1
76+
2 1 2
77+
2 2 2
78+
79+
80+
-- !query 8
81+
DROP VIEW IF EXISTS testData
82+
-- !query 8 schema
83+
struct<>
84+
-- !query 8 output
85+
86+
87+
88+
-- !query 9
89+
DROP VIEW IF EXISTS testData2
90+
-- !query 9 schema
91+
struct<>
92+
-- !query 9 output
93+

0 commit comments

Comments
 (0)