Github user maropu commented on a diff in the pull request: https://github.com/apache/spark/pull/22707#discussion_r239996822 --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/InsertSuite.scala --- @@ -774,4 +774,23 @@ class InsertSuite extends QueryTest with TestHiveSingleton with BeforeAndAfter } } } + + test("SPARK-25717: Insert overwrite a recreated external and partitioned table " + + "should remove the historical partition first") { + withTempDir { tmpDir => + withTable("test_table") { + (0 until 3).foreach { _ => + sql("DROP TABLE IF EXISTS test_table") + sql( + s""" + |CREATE EXTERNAL TABLE test_table (key int) + |PARTITIONED BY (p int) + |LOCATION '${tmpDir.toURI.toString.stripSuffix("/")}/test_table' --- End diff -- nit: `|LOCATION '${tmpDir.toURI}'`?
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org