nastra commented on code in PR #14113: URL: https://github.com/apache/iceberg/pull/14113#discussion_r2364005032
########## bigquery/src/test/java/org/apache/iceberg/gcp/bigquery/TestBigQueryCatalog.java: ########## @@ -171,4 +181,85 @@ public void renameTableNamespaceMissing() { public void testRenameTableMissingSourceTable() { super.testRenameTableMissingSourceTable(); } + + @Test + public void testIsValidIdentifierWithValidSingleLevelNamespace() { + TableIdentifier validIdentifier = TableIdentifier.of("dataset1", "table1"); + assertThat(catalog.isValidIdentifier(validIdentifier)).isTrue(); + } + + @Test + public void testIsValidIdentifierWithInvalidMultiLevelNamespace() { + TableIdentifier invalidIdentifier = + TableIdentifier.of(Namespace.of("level1", "level2"), "table1"); + assertThat(catalog.isValidIdentifier(invalidIdentifier)).isFalse(); + } + + @Test + public void testIsValidIdentifierWithThreeLevelNamespace() { + TableIdentifier invalidIdentifier = + TableIdentifier.of(Namespace.of("level1", "level2", "level3"), "table1"); + assertThat(catalog.isValidIdentifier(invalidIdentifier)).isFalse(); + } + + @Test + public void testIsValidIdentifierWithEmptyNamespace() { + TableIdentifier invalidIdentifier = TableIdentifier.of(Namespace.empty(), "table1"); + assertThat(catalog.isValidIdentifier(invalidIdentifier)).isFalse(); + } + + @Test + public void testLoadMetadataTableIsCalled() { Review Comment: yeah I agree, we should be able to remove this test method entirely and rely on the testing behavior defined in `CatalogTests`. The reason this method existed here is so that it could be disabled -- 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