Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/16868#discussion_r100685218
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala
---
@@ -969,15 +1053,19 @@ class HiveDDLSuite
val targetTable = spark.sessionState.catalog.getTableMetadata(
TableIdentifier(targetTabName, Some("default")))
- checkCreateTableLike(sourceView, targetTable)
+ checkCreateTableLike(sourceView, targetTable, tableType)
}
}
}
- private def checkCreateTableLike(sourceTable: CatalogTable, targetTable:
CatalogTable): Unit = {
- // The created table should be a MANAGED table with empty view text
and original text.
- assert(targetTable.tableType == CatalogTableType.MANAGED,
- "the created table must be a Hive managed table")
+ private def checkCreateTableLike(
+ sourceTable: CatalogTable,
+ targetTable: CatalogTable,
+ tableType: CatalogTableType): Unit = {
+ // The created table should be a MANAGED table or EXTERNAL table with
empty view text
+ // and original text.
+ assert(targetTable.tableType == tableType,
+ s"the created table must be a Hive ${tableType.name} table")
--- End diff --
For a Hive table? It could be a data source table too.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]