nastra commented on code in PR #11064: URL: https://github.com/apache/iceberg/pull/11064#discussion_r1843788190
########## core/src/test/java/org/apache/iceberg/view/ViewCatalogTests.java: ########## @@ -127,6 +127,36 @@ public void basicCreateView() { assertThat(catalog().viewExists(identifier)).as("View should not exist").isFalse(); } + @Test + public void defaultViewProperties() { + TableIdentifier identifier = TableIdentifier.of("ns", "view"); + + if (requiresNamespaceCreate()) { + catalog().createNamespace(identifier.namespace()); + } + + assertThat(catalog().viewExists(identifier)).as("View should not exist").isFalse(); + + String location = + Paths.get(tempDir.toUri().toString(), Paths.get("ns", "view").toString()).toString(); + View view = + catalog() + .buildView(identifier) + .withSchema(SCHEMA) + .withDefaultNamespace(identifier.namespace()) + .withDefaultCatalog(catalog().name()) + .withQuery("spark", "select * from ns.tbl") + .withProperty("prop1", "val1") + .withLocation(location) + .create(); + + assertThat(view).isNotNull(); + assertThat(view.properties()).containsEntry("key1", "catalog-default-key1"); Review Comment: I think it would be good to add a second default property, which is then overriden during view creation -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org