Skip to content

Commit

Permalink
[HUDI-9040] Set the correct table path when renaming tables
Browse files Browse the repository at this point in the history
  • Loading branch information
CTTY committed Feb 17, 2025
1 parent f9b26da commit bf455ed
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

}
Expand Down

0 comments on commit bf455ed

Please sign in to comment.