nastra commented on code in PR #12014:
URL: https://github.com/apache/iceberg/pull/12014#discussion_r1942401950
##########
core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java:
##########
@@ -1639,6 +1641,29 @@ public void updateViewLocationConflict() {
.hasMessageContaining("View does not exist: ns.view");
}
+ @Test
+ public void loadViewMetadataTable() {
+ TableIdentifier identifier = TableIdentifier.of("ns", "view");
+
+ if (requiresNamespaceCreate()) {
+ catalog().createNamespace(identifier.namespace());
+ }
+
+ assertThat(catalog().viewExists(identifier)).as("View should not
exist").isFalse();
+
+ View view =
+ catalog()
+ .buildView(identifier)
+ .withSchema(SCHEMA)
+ .withDefaultNamespace(identifier.namespace())
+ .withQuery("trino", "select * from ns.tbl")
+ .create();
+
+ assertThat(catalog().viewExists(identifier)).as("View should
exist").isTrue();
+ Table table = tableCatalog().loadTable(TableIdentifier.of("ns", "view",
"version"));
+ assertThat(table).isInstanceOf(ViewVersionTable.class);
Review Comment:
this here should probably also have some additional checks
--
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]