ajantha-bhat commented on code in PR #14868:
URL: https://github.com/apache/iceberg/pull/14868#discussion_r2631653192
##########
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:
good catch. I will fix it.
I had this in back of my mind and forgot while implementing because I
followed `registerTable` and it is missing `viewExist` check. I will fix
`registerTable` in a follow up PR.
--
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]