Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Won't Fix
-
2.2.1
-
None
-
None
Description
TOBO work: Fix the bug in alter table set location.
org.apache.spark.sql.execution.command.DDLSuite#testSetLocation
// TODO(gatorsmile): fix the bug in alter table set location. // if (isUsingHiveMetastore) { // assert(storageFormat.properties.get("path") === expected) // }
Analysis:
because user add locationUri and erase path by
newPath = None
in org.apache.spark.sql.hive.HiveExternalCatalog#restoreDataSourceTable:
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(_)))
}
=>
newPath = None
Attachments
Issue Links
- duplicates
-
SPARK-23057 SET LOCATION should change the path of partition in table
- Resolved
- links to