yihua commented on code in PR #12848:
URL: https://github.com/apache/hudi/pull/12848#discussion_r1966613053
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/ddl/TestAlterTable.scala:
##########
@@ -342,6 +343,9 @@ class TestAlterTable extends HoodieSparkSqlTestBase {
} else {
assertResult(None) (newLocation)
}
+ assert(newTable.location.toString.equals(newLocation.get))
Review Comment:
Use `assertResult(newLocation.get)(newTable.location)`?
##########
hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hudi/command/AlterHoodieTableRenameCommand.scala:
##########
@@ -52,8 +52,7 @@ case class AlterHoodieTableRenameCommand(
// update table properties path in every op
if (hoodieCatalogTable.table.properties.contains("path")) {
val catalogTable =
sparkSession.sessionState.catalog.getTableMetadata(newName)
- val path = catalogTable.storage.locationUri.get.getPath
- AlterTableSetPropertiesCommand(newName, Map("path" -> path),
isView).run(sparkSession)
+ AlterTableSetPropertiesCommand(newName, Map("path" ->
catalogTable.location.toString), isView).run(sparkSession)
Review Comment:
Does the base path of Hudi table change under the hood?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]