nastra commented on code in PR #14868:
URL: https://github.com/apache/iceberg/pull/14868#discussion_r2631239990


##########
core/src/main/java/org/apache/iceberg/view/BaseMetastoreViewCatalog.java:
##########
@@ -298,4 +299,24 @@ public Transaction replaceTransaction() {
       return super.replaceTransaction();
     }
   }
+
+  @Override
+  public View registerView(TableIdentifier identifier, String 
metadataFileLocation) {
+    Preconditions.checkArgument(
+        identifier != null && isValidIdentifier(identifier), "Invalid 
identifier: %s", identifier);
+    Preconditions.checkArgument(
+        metadataFileLocation != null && !metadataFileLocation.isEmpty(),
+        "Cannot register an empty metadata file location as a view");
+
+    if (viewExists(identifier)) {

Review Comment:
   what happens if a table with that name already exists?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to