in zetasql-toolkit-bigquery/src/main/java/com/google/zetasql/toolkit/catalog/bigquery/BigQueryCatalog.java [462:480]
public void register(Constant constant) {
String fullName = constant.getFullName();
if (constant.getNamePath().size() > 1) {
throw new IllegalArgumentException(
"BigQuery constants cannot be qualified, was: " + fullName);
}
boolean constantExists =
this.catalog.getConstantList().stream()
.anyMatch(
existingConstant -> existingConstant.getFullName().equalsIgnoreCase(fullName));
if (constantExists) {
throw new CatalogResourceAlreadyExists(fullName, "Constant " + fullName + "already exists");
}
this.catalog.addConstant(constant);
}