englefly commented on code in PR #25213:
URL: https://github.com/apache/doris/pull/25213#discussion_r1352269919
##########
fe/fe-core/src/main/java/org/apache/doris/qe/ShowExecutor.java:
##########
@@ -2663,9 +2665,16 @@ private void handleShowAnalyze() {
for (AnalysisInfo analysisInfo : results) {
List<String> row = new ArrayList<>();
row.add(String.valueOf(analysisInfo.jobId));
- row.add(analysisInfo.catalogName);
- row.add(analysisInfo.dbName);
- row.add(analysisInfo.tblName);
+ CatalogIf<? extends DatabaseIf<? extends TableIf>> c =
StatisticsUtil.findCatalog(analysisInfo.catalogId);
+ row.add(c.getName());
+ Optional<? extends DatabaseIf<? extends TableIf>> databaseIf =
c.getDb(analysisInfo.dbId);
+ row.add(databaseIf.isPresent() ? databaseIf.get().getFullName() :
"DB may get deleted");
+ if (databaseIf.isPresent()) {
+ Optional<? extends TableIf> table =
databaseIf.get().getTable(analysisInfo.tblId);
+ row.add(table.isPresent() ? table.get().getName() : "Table may
get deleted");
Review Comment:
if db is deleted, how to handle this error?
why there is no lock?
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]