Github user yhuai commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15024#discussion_r86070568
  
    --- Diff: 
sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala ---
    @@ -259,10 +266,9 @@ private[spark] class HiveExternalCatalog(conf: 
SparkConf, hadoopConf: Configurat
             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)
    -          require(map.contains("path"),
    +          require(tableDefinition.storage.locationUri.isDefined,
                 "External file-based data source table must have a `path` 
entry in storage properties.")
    -          Some(new Path(map("path")).toUri.toString)
    +          Some(new 
Path(tableDefinition.storage.locationUri.get).toUri.toString)
    --- End diff --
    
    This part looks weird since we already have a location uri.


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to