Skip to content

Commit 4bcb306

Browse files
committed
address comments.
1 parent 4ce96e6 commit 4bcb306

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

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

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -816,10 +816,6 @@ class HiveDDLSuite
816816
"the created table must be a Hive managed table")
817817
assert(targetTable.viewText.isEmpty && targetTable.viewOriginalText.isEmpty,
818818
"the view text and original text in the created table must be empty")
819-
// The location of created table should not be empty. Although Spark SQL does not set it,
820-
// when creating it, Hive populates it.
821-
assert(targetTable.storage.locationUri.nonEmpty,
822-
"the location of created table should not be empty")
823819
assert(targetTable.comment.isEmpty,
824820
"the comment in the created table must be empty")
825821
assert(targetTable.unsupportedFeatures.isEmpty,
@@ -855,15 +851,11 @@ class HiveDDLSuite
855851
}
856852

857853
if (sourceTable.tableType == CatalogTableType.VIEW) {
858-
// Source table is a temporary/permanent view, which does not have a provider, serde,
859-
// inputFormat, and outputFormat. The created target table uses the default data source format
860-
assert(targetTable.storage.serde ==
861-
Option("org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe"))
862-
assert(targetTable.storage.inputFormat ==
863-
Option("org.apache.hadoop.hive.ql.io.parquet.MapredParquetInputFormat"))
864-
assert(targetTable.storage.outputFormat ==
865-
Option("org.apache.hadoop.hive.ql.io.parquet.MapredParquetOutputFormat"))
854+
// Source table is a temporary/permanent view, which does not have a provider. The created
855+
// target table uses the default data source format
866856
assert(targetTable.provider == Option(spark.sessionState.conf.defaultDataSourceName))
857+
} else {
858+
assert(targetTable.provider == sourceTable.provider)
867859
}
868860

869861
val sourceTablePath = getTablePath(sourceTable)

0 commit comments

Comments
 (0)