singhpk234 commented on code in PR #14113: URL: https://github.com/apache/iceberg/pull/14113#discussion_r2363791926
########## 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: any reason why can't re-use the same test ? as if just enable this test from the base class it test if we can read the Files metadata table ? -- 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