You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gengliangwang <gi...@git.apache.org> on 2018/04/09 18:06:06 UTC

[GitHub] spark pull request #20260: [SPARK-23039][SQL] Finish TODO work in alter tabl...

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

    https://github.com/apache/spark/pull/20260#discussion_r180181331
  
    --- Diff: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala ---
    @@ -787,7 +787,7 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf: Configurat
         val storageWithLocation = {
           val tableLocation = getLocationFromStorageProps(table)
           // We pass None as `newPath` here, to remove the path option in storage properties.
    -      updateLocationInStorageProps(table, newPath = None).copy(
    +      table.storage.copy(
    --- End diff --
    
    In the comments above:
    ```
        // Internally we store the table location in storage properties with key "path" for data
        // source tables. Here we set the table location to `locationUri` field and filter out the
        // path option in storage properties, to avoid exposing this concept externally.
    ```
    ```
    // We pass None as `newPath` here, to remove the path option in storage properties.
    ```
    The property `path` is removed intentionally. 
    To finish to a `TODO` comment in unit test is not a good reason to keep it.


---

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