Skip to content

Commit 5aaa96b

Browse files
committed
Comments and format
1 parent b98ee09 commit 5aaa96b

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ private[hive] class HiveMetastoreCatalog(val client: ClientInterface, hive: Hive
279279
hadoopFsRelation.partitionColumns.nonEmpty
280280
} catch {
281281
case _: java.io.FileNotFoundException =>
282-
// When we reach here, it is possible that underlying dir for the table
282+
// When we reach here, it is possible that the underlying dir for the table
283283
// has not been created. So, there is no partition.
284284
false
285285
}
@@ -302,8 +302,9 @@ private[hive] class HiveMetastoreCatalog(val client: ClientInterface, hive: Hive
302302
HiveTable(
303303
specifiedDatabase = Option(dbName),
304304
name = tblName,
305-
// Since the table is not partitioned, we use dataSchema instead of using schema,
306-
// which will trigger partition discovery on the path that may not be created.
305+
// Since the table is not partitioned, we use dataSchema instead of using schema.
306+
// Using schema which will trigger partition discovery on the path that
307+
// may not be created.
307308
schema = schemaToHiveColumn(relation.dataSchema),
308309
partitionColumns = Nil,
309310
tableType = tableType,

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -707,9 +707,7 @@ class MetastoreDataSourcesSuite extends QueryTest with SQLTestUtils with TestHiv
707707
options = Map("path" -> "an invalid path"),
708708
isExternal = false)
709709

710-
invalidateTable("test_drop_table_with_invalid_path")
711-
712-
sql("DROP TABLE IF EXISTS test_drop_table_with_invalid_path")
710+
sql("DROP TABLE test_drop_table_with_invalid_path")
713711
}
714712

715713
test("SPARK-6024 wide schema support") {
@@ -730,7 +728,6 @@ class MetastoreDataSourcesSuite extends QueryTest with SQLTestUtils with TestHiv
730728

731729
invalidateTable("wide_schema")
732730

733-
734731
val actualSchema = table("wide_schema").schema
735732
assert(schema === actualSchema)
736733
}

0 commit comments

Comments
 (0)