Skip to content

Commit 18ec570

Browse files
committed
fix test failed
1 parent 55c525e commit 18ec570

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

sql/core/src/test/scala/org/apache/spark/sql/internal/CatalogSuite.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ class CatalogSuite
459459
options = Map("path" -> dir.getAbsolutePath))
460460
val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
461461
assert(table.tableType == CatalogTableType.EXTERNAL)
462-
assert(table.storage.locationUri.get == dir.getAbsolutePath)
462+
assert(table.storage.locationUri.get == s"file:${dir.getAbsolutePath}")
463463

464464
Seq((1)).toDF("i").write.insertInto("t")
465465
assert(dir.exists() && dir.listFiles().nonEmpty)

sql/core/src/test/scala/org/apache/spark/sql/sources/PathOptionSuite.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ class PathOptionSuite extends DataSourceTest with SharedSQLContext {
7272
|USING ${classOf[TestOptionsSource].getCanonicalName}
7373
|OPTIONS (PATH '/tmp/path')
7474
""".stripMargin)
75-
assert(getPathOption("src") == Some("/tmp/path"))
75+
assert(getPathOption("src") == Some("file:/tmp/path"))
7676
}
7777

7878
// should exist even path option is not specified when creating table
@@ -93,7 +93,7 @@ class PathOptionSuite extends DataSourceTest with SharedSQLContext {
9393
|OPTIONS (PATH '$path')
9494
|AS SELECT 1
9595
""".stripMargin)
96-
assert(spark.table("src").schema.head.metadata.getString("path") == path)
96+
assert(spark.table("src").schema.head.metadata.getString("path") == s"file:$path")
9797
}
9898
}
9999

0 commit comments

Comments
 (0)