FANNG1 commented on code in PR #9572:
URL: https://github.com/apache/gravitino/pull/9572#discussion_r2652067724
##########
catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergCatalogOperations.java:
##########
@@ -449,15 +449,30 @@ private Table internalUpdateTable(NameIdentifier
tableIdent, TableChange... chan
private Table renameTable(NameIdentifier tableIdent, TableChange.RenameTable
renameTable)
throws NoSuchTableException, IllegalArgumentException {
try {
+ Namespace destinationNamespace = tableIdent.namespace();
+ if (renameTable.getNewSchemaName().isPresent()) {
+ String[] namespaceLevels = tableIdent.namespace().levels();
+ String[] destinationLevels = Arrays.copyOf(namespaceLevels,
namespaceLevels.length);
+ destinationLevels[destinationLevels.length - 1] =
renameTable.getNewSchemaName().get();
+ NameIdentifier destinationSchemaIdent =
NameIdentifier.of(destinationLevels);
Review Comment:
yes
##########
catalogs/catalog-lakehouse-iceberg/src/main/java/org/apache/gravitino/catalog/lakehouse/iceberg/IcebergCatalogOperations.java:
##########
@@ -449,15 +449,30 @@ private Table internalUpdateTable(NameIdentifier
tableIdent, TableChange... chan
private Table renameTable(NameIdentifier tableIdent, TableChange.RenameTable
renameTable)
throws NoSuchTableException, IllegalArgumentException {
try {
+ Namespace destinationNamespace = tableIdent.namespace();
+ if (renameTable.getNewSchemaName().isPresent()) {
+ String[] namespaceLevels = tableIdent.namespace().levels();
+ String[] destinationLevels = Arrays.copyOf(namespaceLevels,
namespaceLevels.length);
+ destinationLevels[destinationLevels.length - 1] =
renameTable.getNewSchemaName().get();
+ NameIdentifier destinationSchemaIdent =
NameIdentifier.of(destinationLevels);
Review Comment:
updated
--
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]