Skip to content

Commit 7c65386

Browse files
committed
hiveTableFilePath -> hiveDefaultTableFilePath
1 parent e437e89 commit 7c65386

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveMetastoreCatalog.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ private[hive] class HiveMetastoreCatalog(hive: HiveContext) extends Catalog with
175175
}
176176
}
177177

178-
def hiveTableFilePath(tableName: String): String = synchronized {
178+
def hiveDefaultTableFilePath(tableName: String): String = synchronized {
179179
val (databaseName, tblName) = getDBAndTableName(tableName.split("\\."))
180180
val db = client.getDatabase(databaseName)
181181

sql/hive/src/main/scala/org/apache/spark/sql/hive/execution/commands.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ case class CreateMetastoreDataSource(
127127
if (!options.contains("path") && managedIfNoPath) {
128128
isExternal = false
129129
options +
130-
("path" -> hiveContext.catalog.hiveTableFilePath(tableIdents))
130+
("path" -> hiveContext.catalog.hiveDefaultTableFilePath(tableIdents))
131131
} else {
132132
options
133133
}
@@ -160,7 +160,7 @@ case class CreateMetastoreDataSourceAsSelect(
160160
if (!options.contains("path")) {
161161
isExternal = false
162162
options +
163-
("path" -> hiveContext.catalog.hiveTableFilePath(tableName))
163+
("path" -> hiveContext.catalog.hiveDefaultTableFilePath(tableName))
164164
} else {
165165
options
166166
}

sql/hive/src/test/java/org/apache/spark/sql/hive/JavaMetastoreDataSourcesSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public void setUp() throws IOException {
7070
if (path.exists()) {
7171
path.delete();
7272
}
73-
hiveManagedPath = new Path(sqlContext.catalog().hiveTableFilePath("javaSavedTable"));
73+
hiveManagedPath = new Path(sqlContext.catalog().hiveDefaultTableFilePath("javaSavedTable"));
7474
fs = hiveManagedPath.getFileSystem(sc.hadoopConfiguration());
7575
if (fs.exists(hiveManagedPath)){
7676
fs.delete(hiveManagedPath, true);

sql/hive/src/test/scala/org/apache/spark/sql/hive/MetastoreDataSourcesSuite.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ class MetastoreDataSourcesSuite extends QueryTest with BeforeAndAfterEach {
441441
|)
442442
""".stripMargin)
443443

444-
val expectedPath = catalog.hiveTableFilePath("ctasJsonTable")
444+
val expectedPath = catalog.hiveDefaultTableFilePath("ctasJsonTable")
445445
val filesystemPath = new Path(expectedPath)
446446
val fs = filesystemPath.getFileSystem(sparkContext.hadoopConfiguration)
447447
if (fs.exists(filesystemPath)) fs.delete(filesystemPath, true)
@@ -559,7 +559,7 @@ class MetastoreDataSourcesSuite extends QueryTest with BeforeAndAfterEach {
559559
// Drop table will also delete the data.
560560
sql("DROP TABLE savedJsonTable")
561561
intercept[InvalidInputException] {
562-
jsonFile(catalog.hiveTableFilePath("savedJsonTable"))
562+
jsonFile(catalog.hiveDefaultTableFilePath("savedJsonTable"))
563563
}
564564

565565
// Create an external table by specifying the path.
@@ -775,7 +775,7 @@ class MetastoreDataSourcesSuite extends QueryTest with BeforeAndAfterEach {
775775
tbl.setProperty("spark.sql.sources.schema", schema.json)
776776
tbl.setProperty("EXTERNAL", "FALSE")
777777
tbl.setTableType(TableType.MANAGED_TABLE)
778-
tbl.setSerdeParam("path", catalog.hiveTableFilePath(tableName))
778+
tbl.setSerdeParam("path", catalog.hiveDefaultTableFilePath(tableName))
779779
catalog.synchronized {
780780
catalog.client.createTable(tbl)
781781
}

0 commit comments

Comments
 (0)