You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by clockfly <gi...@git.apache.org> on 2016/09/02 05:11:42 UTC
[GitHub] spark pull request #14809: [SPARK-17238][SQL] simplify the logic for convert...
Github user clockfly commented on a diff in the pull request:
https://github.com/apache/spark/pull/14809#discussion_r77293800
--- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala ---
@@ -241,10 +241,21 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf: Configurat
}
// converts the table metadata to Hive compatible format, i.e. set the serde information.
- def newHiveCompatibleMetastoreTable(serde: HiveSerDe, path: String): CatalogTable = {
+ def newHiveCompatibleMetastoreTable(serde: HiveSerDe): CatalogTable = {
+ val location = if (tableDefinition.tableType == EXTERNAL) {
+ // When we hit this branch, we are saving an external data source table with hive
+ // compatible format, which means the data source is file-based and must have a `path`.
+ val map = new CaseInsensitiveMap(tableDefinition.storage.properties)
+ assert(map.contains("path"),
--- End diff --
assert will be removed during runtime, can we use explicit exception?
---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org