in zetasql-toolkit-bigquery/src/main/java/com/google/zetasql/toolkit/catalog/bigquery/BigQueryCatalog.java [324:341]
public void register(SimpleTable table, CreateMode createMode, CreateScope createScope) {
this.validateCreateScope(
createScope,
ImmutableList.of(CreateScope.CREATE_DEFAULT_SCOPE, CreateScope.CREATE_TEMP),
table.getFullName(),
"table");
this.validateNamePathForCreation(ImmutableList.of(table.getFullName()), createScope, "table");
List<String> catalogNamesForTable = buildCatalogNamesForResource(table.getFullName());
try {
catalogNamesForTable.forEach(
catalogName ->
CatalogOperations.createTableInCatalog(catalog, catalogName, table, createMode));
} catch (CatalogResourceAlreadyExists alreadyExists) {
throw this.addCaseInsensitivityWarning(alreadyExists);
}
}