File tree Expand file tree Collapse file tree 1 file changed +8
-22
lines changed
sql/hive/src/test/scala/org/apache/spark/sql/hive Expand file tree Collapse file tree 1 file changed +8
-22
lines changed Original file line number Diff line number Diff line change @@ -495,28 +495,14 @@ class InsertIntoHiveTableSuite extends QueryTest with TestHiveSingleton with Bef
495495 }
496496 }
497497
498- test(
499- """ SPARK-20594: This is a walk-around fix to resolve a Hive bug. Hive requires that the
500- |staging directory needs to avoid being deleted when users set hive.exec.stagingdir
501- |under the table directory.""" .stripMargin) {
502-
503- withTable(" test_table" ) {
504-
505- sql(" CREATE TABLE test_table (key int)" )
506-
507- // Set hive.exec.stagingdir under the table directory without start with ".".
508- sql(" set hive.exec.stagingdir=./test" )
509-
510- // Now overwrite.
511- sql(" INSERT OVERWRITE TABLE test_table SELECT 1" )
512-
513- // Make sure the table has also been updated.
514- checkAnswer(
515- sql(" SELECT * FROM test_table" ),
516- Row (1 )
517- )
518-
519- sql(" reset" )
498+ test(" SPARK-20594: hive.exec.stagingdir was deleted by Hive" ) {
499+ // Set hive.exec.stagingdir under the table directory without start with ".".
500+ withSQLConf(" hive.exec.stagingdir" -> " ./test" ) {
501+ withTable(" test_table" ) {
502+ sql(" CREATE TABLE test_table (key int)" )
503+ sql(" INSERT OVERWRITE TABLE test_table SELECT 1" )
504+ checkAnswer(sql(" SELECT * FROM test_table" ), Row (1 ))
505+ }
520506 }
521507 }
522508}
You can’t perform that action at this time.
0 commit comments