Github user clockfly commented on a diff in the pull request: https://github.com/apache/spark/pull/15024#discussion_r78484539 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala --- @@ -665,15 +665,7 @@ case class AlterTableSetLocationCommand( catalog.alterPartitions(tableName, Seq(newPart)) case None => // No partition spec is specified, so we set the location for the table itself - val newTable = - if (DDLUtils.isDatasourceTable(table)) { - table.withNewStorage( - locationUri = Some(location), - properties = table.storage.properties ++ Map("path" -> location)) - } else { - table.withNewStorage(locationUri = Some(location)) - } - catalog.alterTable(newTable) + catalog.alterTable(table.withNewStorage(locationUri = Some(location))) --- End diff -- It is strange to allow user to change location of a managed table. Maybe we should ban this usage? Probably not in the scope of this PR.
--- 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