Skip to content

Commit

Permalink
[opt](iceberg) no need to check the name format of iceberg's database (
Browse files Browse the repository at this point in the history
…apache#32977)

No need to check the name format of iceberg's database.
We should accept all databases.
  • Loading branch information
morningman committed Apr 7, 2024
1 parent e9b67bc commit 8bb2ef1
Showing 1 changed file with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,8 @@
import org.apache.doris.catalog.Column;
import org.apache.doris.catalog.StructField;
import org.apache.doris.catalog.StructType;
import org.apache.doris.common.AnalysisException;
import org.apache.doris.common.DdlException;
import org.apache.doris.common.FeNameFormat;
import org.apache.doris.common.UserException;
import org.apache.doris.common.util.Util;
import org.apache.doris.datasource.DorisTypeVisitor;
import org.apache.doris.datasource.ExternalDatabase;
import org.apache.doris.datasource.operations.ExternalMetadataOps;
Expand Down Expand Up @@ -71,16 +68,7 @@ public boolean tableExist(String dbName, String tblName) {

public List<String> listDatabaseNames() {
return nsCatalog.listNamespaces().stream()
.map(e -> {
String dbName = e.toString();
try {
FeNameFormat.checkDbName(dbName);
} catch (AnalysisException ex) {
Util.logAndThrowRuntimeException(LOG,
String.format("Not a supported namespace name format: %s", dbName), ex);
}
return dbName;
})
.map(e -> e.toString())
.collect(Collectors.toList());
}

Expand Down

0 comments on commit 8bb2ef1

Please sign in to comment.