pvary commented on code in PR #18691:
URL: https://github.com/apache/iceberg/pull/18691#discussion_r4585397621
##########
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java:
##########
@@ -93,6 +93,27 @@ protected boolean supportsEmptyNamespace() {
return false;
}
+ @ParameterizedTest(name = "purge = {0}")
+ @ValueSource(booleans = {false, true})
+ public void dropTableDoesNotDropIcebergView(boolean purge) {
+ assumeThat(tableCatalog()).as("Only valid for catalogs that support
tables").isNotNull();
+
+ TableIdentifier identifier = TableIdentifier.of("ns", "view");
+ if (requiresNamespaceCreate()) {
+ catalog().createNamespace(identifier.namespace());
+ }
+
+ catalog()
+ .buildView(identifier)
+ .withSchema(SCHEMA)
+ .withDefaultNamespace(identifier.namespace())
+ .withQuery("hive", "select * from ns.tbl")
+ .create();
+
+ assertThat(tableCatalog().dropTable(identifier, purge)).isFalse();
+ assertThat(catalog().viewExists(identifier)).isTrue();
Review Comment:
Shall we try to load the view to ensure that the metadata still 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]