[ 
https://issues.apache.org/jira/browse/SPARK-23039?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16423996#comment-16423996
 ] 

Thomas Graves commented on SPARK-23039:
---------------------------------------

seems to be a dup of 
 # SPARK-23057

>  Fix the bug in alter table set location.
> -----------------------------------------
>
>                 Key: SPARK-23039
>                 URL: https://issues.apache.org/jira/browse/SPARK-23039
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 2.2.1
>            Reporter: xubo245
>            Priority: Critical
>
> TOBO work: Fix the bug in alter table set location.   
> org.apache.spark.sql.execution.command.DDLSuite#testSetLocation
> {code:java}
>     // TODO(gatorsmile): fix the bug in alter table set location.
>    //    if (isUsingHiveMetastore) {
>     //    assert(storageFormat.properties.get("path") === expected)
>     //   }
> {code}
> Analysis:
> because user add locationUri and erase path by 
> {code:java}
>  newPath = None
> {code}
> in org.apache.spark.sql.hive.HiveExternalCatalog#restoreDataSourceTable:
> {code:java}
> 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(
>         locationUri = tableLocation.map(CatalogUtils.stringToURI(_)))
>     }
> {code}
> =>
> newPath = None



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to