Github user wangyum commented on the issue: https://github.com/apache/spark/pull/20668 Otherwise, `SessionCatalogSuite` also needs to be updated ```scala Index: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalogSuite.scala IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalogSuite.scala (date 1519557876000) +++ sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalogSuite.scala (date 1519702924000) @@ -955,8 +955,10 @@ val oldPart1 = catalog.getPartition(TableIdentifier("tbl2", Some("db2")), part1.spec) val oldPart2 = catalog.getPartition(TableIdentifier("tbl2", Some("db2")), part2.spec) catalog.alterPartitions(TableIdentifier("tbl2", Some("db2")), Seq( - oldPart1.copy(storage = storageFormat.copy(locationUri = Some(newLocation))), - oldPart2.copy(storage = storageFormat.copy(locationUri = Some(newLocation))))) + oldPart1.copy(parameters = oldPart1.parameters, + storage = storageFormat.copy(locationUri = Some(newLocation))), + oldPart2.copy(parameters = oldPart2.parameters, + storage = storageFormat.copy(locationUri = Some(newLocation))))) val newPart1 = catalog.getPartition(TableIdentifier("tbl2", Some("db2")), part1.spec) val newPart2 = catalog.getPartition(TableIdentifier("tbl2", Some("db2")), part2.spec) assert(newPart1.storage.locationUri == Some(newLocation)) @@ -965,7 +967,9 @@ assert(oldPart2.storage.locationUri != Some(newLocation)) // Alter partitions without explicitly specifying database catalog.setCurrentDatabase("db2") - catalog.alterPartitions(TableIdentifier("tbl2"), Seq(oldPart1, oldPart2)) + catalog.alterPartitions(TableIdentifier("tbl2"), + Seq(oldPart1.copy(parameters = newPart1.parameters), + oldPart2.copy(parameters = newPart2.parameters))) val newerPart1 = catalog.getPartition(TableIdentifier("tbl2"), part1.spec) val newerPart2 = catalog.getPartition(TableIdentifier("tbl2"), part2.spec) assert(oldPart1.storage.locationUri == newerPart1.storage.locationUri) ```
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org