From bf6a9383bc8f24cb61d5d2bc8bdd46f92097a8af Mon Sep 17 00:00:00 2001 From: AKIRA <33112463+Kikyou1997@users.noreply.github.com> Date: Thu, 16 Nov 2023 13:10:50 +0900 Subject: [PATCH] [fix](stats) table not exists error msg not print objects name (#27074) --- .../org/apache/doris/analysis/ShowTableStatsStmt.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowTableStatsStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowTableStatsStmt.java index fe499fa1b0..e58c040a4a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowTableStatsStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ShowTableStatsStmt.java @@ -83,21 +83,21 @@ public class ShowTableStatsStmt extends ShowStmt { } CatalogIf catalog = Env.getCurrentEnv().getCatalogMgr().getCatalog(tableName.getCtl()); if (catalog == null) { - ErrorReport.reportAnalysisException("Catalog: {} not exists", tableName.getCtl()); + ErrorReport.reportAnalysisException(String.format("Catalog: %s not exists", tableName.getCtl())); } DatabaseIf db = catalog.getDb(tableName.getDb()).orElse(null); if (db == null) { - ErrorReport.reportAnalysisException("DB: {} not exists", tableName.getDb()); + ErrorReport.reportAnalysisException(String.format("DB: %s not exists", tableName.getDb())); } table = db.getTable(tableName.getTbl()).orElse(null); if (table == null) { - ErrorReport.reportAnalysisException("Table: {} not exists", tableName.getTbl()); + ErrorReport.reportAnalysisException(String.format("Table: %s not exists", tableName.getTbl())); } if (partitionNames != null) { String partitionName = partitionNames.getPartitionNames().get(0); Partition partition = table.getPartition(partitionName); if (partition == null) { - ErrorReport.reportAnalysisException("Partition: {} not exists", partitionName); + ErrorReport.reportAnalysisException(String.format("Partition: %s not exists", partitionName)); } } if (!Env.getCurrentEnv().getAccessManager()