diqiu50 commented on code in PR #11189:
URL: https://github.com/apache/gravitino/pull/11189#discussion_r3301823726
##########
flink-connector/flink-common/src/main/java/org/apache/gravitino/flink/connector/catalog/BaseCatalog.java:
##########
@@ -261,16 +338,36 @@ public void renameTable(ObjectPath tablePath, String
newTableName, boolean ignor
if (catalog().asTableCatalog().tableExists(identifier)) {
throw new TableAlreadyExistException(
- catalogName(), ObjectPath.fromString(tablePath.getDatabaseName() +
newTableName));
+ catalogName(), new ObjectPath(tablePath.getDatabaseName(),
newTableName));
+ }
+ try {
+ if (catalog().asViewCatalog().viewExists(identifier)) {
+ throw new TableAlreadyExistException(
+ catalogName(), new ObjectPath(tablePath.getDatabaseName(),
newTableName));
+ }
+ } catch (UnsupportedOperationException ignored) {
+ // catalog does not support views
Review Comment:
No, the catalog may not support view
--
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]