Skip to content

Commit 97a5c87

Browse files
vrozovdongjoon-hyun
authored andcommitted
[SPARK-54412][SQL][TESTS] Clean up v properly in identifier-clause.sql SQL golden file
### What changes were proposed in this pull request? This PR aims to clean up `v` properly in `identifier-clause.sql` SQL golden file. Note that this is originated from #53121 with the original authorship although the code is changed [according to the community review comment](#53121 (comment)). ### Why are the changes needed? Due to the lack of a proper clean-up, this causes flaky test failures ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #53121 Closes #53176 from dongjoon-hyun/SPARK-54412-2. Authored-by: Vlad Rozov <vrozov@amazon.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org> (cherry picked from commit 12bce6b) Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
1 parent 9bf0ed1 commit 97a5c87

File tree

5 files changed

+29
-0
lines changed

5 files changed

+29
-0
lines changed

sql/core/src/test/resources/sql-tests/analyzer-results/identifier-clause-legacy.sql.out

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,6 +1405,12 @@ org.apache.spark.sql.catalyst.ExtendedAnalysisException
14051405
}
14061406

14071407

1408+
-- !query
1409+
DROP VIEW IF EXISTS v
1410+
-- !query analysis
1411+
DropTableCommand `spark_catalog`.`default`.`v`, true, true, false
1412+
1413+
14081414
-- !query
14091415
CREATE TABLE tab(IDENTIFIER('c1') INT) USING CSV
14101416
-- !query analysis

sql/core/src/test/resources/sql-tests/analyzer-results/identifier-clause.sql.out

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,6 +1379,12 @@ Project [c1#x]
13791379
+- LocalRelation [col1#x]
13801380

13811381

1382+
-- !query
1383+
DROP VIEW IF EXISTS v
1384+
-- !query analysis
1385+
DropTableCommand `spark_catalog`.`default`.`v`, true, true, false
1386+
1387+
13821388
-- !query
13831389
CREATE TABLE tab(IDENTIFIER('c1') INT) USING CSV
13841390
-- !query analysis

sql/core/src/test/resources/sql-tests/inputs/identifier-clause.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ SELECT my_table.* FROM VALUES (1, 2) AS IDENTIFIER('my_table')(IDENTIFIER('c1'),
180180
WITH identifier('v')(identifier('c1')) AS (VALUES(1)) (SELECT c1 FROM v);
181181
CREATE OR REPLACE VIEW v(IDENTIFIER('c1')) AS VALUES(1);
182182
SELECT c1 FROM v;
183+
DROP VIEW IF EXISTS v;
183184
CREATE TABLE tab(IDENTIFIER('c1') INT) USING CSV;
184185
INSERT INTO tab(IDENTIFIER('c1')) VALUES(1);
185186
SELECT c1 FROM tab;

sql/core/src/test/resources/sql-tests/results/identifier-clause-legacy.sql.out

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,6 +1557,14 @@ org.apache.spark.sql.catalyst.ExtendedAnalysisException
15571557
}
15581558

15591559

1560+
-- !query
1561+
DROP VIEW IF EXISTS v
1562+
-- !query schema
1563+
struct<>
1564+
-- !query output
1565+
1566+
1567+
15601568
-- !query
15611569
CREATE TABLE tab(IDENTIFIER('c1') INT) USING CSV
15621570
-- !query schema

sql/core/src/test/resources/sql-tests/results/identifier-clause.sql.out

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,6 +1496,14 @@ struct<c1:int>
14961496
1
14971497

14981498

1499+
-- !query
1500+
DROP VIEW IF EXISTS v
1501+
-- !query schema
1502+
struct<>
1503+
-- !query output
1504+
1505+
1506+
14991507
-- !query
15001508
CREATE TABLE tab(IDENTIFIER('c1') INT) USING CSV
15011509
-- !query schema

0 commit comments

Comments
 (0)