Skip to content

Commit c3439ff

Browse files
committed
add read from an non exist path
1 parent abc57dd commit c3439ff

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1446,8 +1446,11 @@ class HiveDDLSuite
14461446

14471447
var newDir = dir.getAbsolutePath.stripSuffix("/") + "/x"
14481448
spark.sql(s"alter table t set location '$newDir'")
1449+
14491450
table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
14501451
assert(table.location == newDir)
1452+
assert(!new File(newDir).exists())
1453+
checkAnswer(spark.table("t"), Nil)
14511454

14521455
spark.sql("insert into table t select 'c', 1")
14531456
checkAnswer(spark.table("t"), Row("c", 1) :: Nil)

0 commit comments

Comments
 (0)