Skip to content

Commit b6776cc

Browse files
committed
minor cleanup
1 parent 8c80555 commit b6776cc

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,11 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf: Configurat
456456
* properties, and filter out these special entries from table properties.
457457
*/
458458
private def restoreTableMetadata(table: CatalogTable): CatalogTable = {
459-
val tableWithSchema = if (table.tableType == VIEW || conf.get(DEBUG_MODE)) {
459+
if (conf.get(DEBUG_MODE)) {
460+
return table
461+
}
462+
463+
val tableWithSchema = if (table.tableType == VIEW) {
460464
table
461465
} else {
462466
getProviderFromTableProperties(table).map { provider =>
@@ -506,11 +510,7 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf: Configurat
506510
tableWithSchema
507511
}
508512

509-
if (conf.get(DEBUG_MODE)) {
510-
tableWithStats
511-
} else {
512-
tableWithStats.copy(properties = getOriginalTableProperties(table))
513-
}
513+
tableWithStats.copy(properties = getOriginalTableProperties(table))
514514
}
515515

516516
override def tableExists(db: String, table: String): Boolean = withClient {

0 commit comments

Comments
 (0)