Skip to content

Commit a8a35b3

Browse files
techaddictsrowen
authored andcommitted
[MINOR][SQL] Not dropping all necessary tables
## What changes were proposed in this pull request? was not dropping table `parquet_t3` ## How was this patch tested? tested `LogicalPlanToSQLSuite` locally Author: Sandeep Singh <[email protected]> Closes #13767 from techaddict/minor-8.
1 parent 97da410 commit a8a35b3

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/catalyst/LogicalPlanToSQLSuite.scala

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest with SQLTestUtils {
4949

5050
protected override def beforeAll(): Unit = {
5151
super.beforeAll()
52-
sql("DROP TABLE IF EXISTS parquet_t0")
53-
sql("DROP TABLE IF EXISTS parquet_t1")
54-
sql("DROP TABLE IF EXISTS parquet_t2")
52+
(0 to 3).foreach { i =>
53+
sql(s"DROP TABLE IF EXISTS parquet_t$i")
54+
}
5555
sql("DROP TABLE IF EXISTS t0")
5656

5757
spark.range(10).write.saveAsTable("parquet_t0")
@@ -87,10 +87,9 @@ class LogicalPlanToSQLSuite extends SQLBuilderTest with SQLTestUtils {
8787

8888
override protected def afterAll(): Unit = {
8989
try {
90-
sql("DROP TABLE IF EXISTS parquet_t0")
91-
sql("DROP TABLE IF EXISTS parquet_t1")
92-
sql("DROP TABLE IF EXISTS parquet_t2")
93-
sql("DROP TABLE IF EXISTS parquet_t3")
90+
(0 to 3).foreach { i =>
91+
sql(s"DROP TABLE IF EXISTS parquet_t$i")
92+
}
9493
sql("DROP TABLE IF EXISTS t0")
9594
} finally {
9695
super.afterAll()

0 commit comments

Comments
 (0)