morrySnow commented on code in PR #25651: URL: https://github.com/apache/doris/pull/25651#discussion_r1366344943
########## fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateTableInfo.java: ########## @@ -163,20 +175,30 @@ public void validate(ConnectContext ctx) { try { FeNameFormat.checkTableName(tableName); - if (dbName != null) { - FeNameFormat.checkDbName(dbName); - } } catch (Exception e) { throw new AnalysisException(e.getMessage(), e); } + // analyze catalog name + if (Strings.isNullOrEmpty(ctlName)) { + if (ctx.getCurrentCatalog() != null) { + ctlName = ctx.getCurrentCatalog().getName(); + } else { + ctlName = InternalCatalog.INTERNAL_CATALOG_NAME; + } + } + // analyze table name - if (dbName == null) { + if (Strings.isNullOrEmpty(dbName)) { dbName = ClusterNamespace.getFullName(ctx.getClusterName(), ctx.getDatabase()); } else { dbName = ClusterNamespace.getFullName(ctx.getClusterName(), dbName); } + Preconditions.checkState(!Strings.isNullOrEmpty(ctlName)); + Preconditions.checkState(!Strings.isNullOrEmpty(dbName)); Review Comment: add check error msg -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org