ajantha-bhat commented on code in PR #14868:
URL: https://github.com/apache/iceberg/pull/14868#discussion_r2631643057
##########
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java:
##########
@@ -1968,4 +1970,87 @@ public void dropNonEmptyNamespace() {
.as("Namespace should not exist")
.isFalse();
}
+
+ @Test
+ public void registerView() {
+ C catalog = catalog();
+
+ // Register view is not yet supported for REST catalog
+ assumeThat(catalog instanceof RESTCatalog).isFalse();
+
+ TableIdentifier identifier = TableIdentifier.of("ns", "view");
+
+ if (requiresNamespaceCreate()) {
+ catalog.createNamespace(identifier.namespace());
+ }
+
+ View originalView =
+ catalog()
+ .buildView(identifier)
+ .withSchema(SCHEMA)
+ .withDefaultNamespace(identifier.namespace())
+ .withDefaultCatalog(catalog().name())
+ .withQuery("spark", "select * from ns.tbl")
+ .withProperty(GC_ENABLED, "false")
Review Comment:
The drop view will delete the view metadata. So, we will not have any file
to register. Hence, needed to just delete entry from catalog and use file to
register again.
--
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]