caiconghui commented on a change in pull request #3775: URL: https://github.com/apache/incubator-doris/pull/3775#discussion_r531423249
########## File path: fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java ########## @@ -456,23 +437,23 @@ public void analyze(TQueryOptions tQueryOptions) throws UserException { if (parsedStmt instanceof QueryStmt || parsedStmt instanceof InsertStmt || parsedStmt instanceof CreateTableAsSelectStmt) { - Map<String, Database> dbs = Maps.newTreeMap(); + Map<Long, Table> tableMap = Maps.newTreeMap(); QueryStmt queryStmt; Set<String> parentViewNameSet = Sets.newHashSet(); if (parsedStmt instanceof QueryStmt) { queryStmt = (QueryStmt) parsedStmt; - queryStmt.getDbs(analyzer, dbs, parentViewNameSet); + queryStmt.getTables(analyzer, tableMap, parentViewNameSet); } else { InsertStmt insertStmt; if (parsedStmt instanceof InsertStmt) { insertStmt = (InsertStmt) parsedStmt; } else { insertStmt = ((CreateTableAsSelectStmt) parsedStmt).getInsertStmt(); } - insertStmt.getDbs(analyzer, dbs, parentViewNameSet); + insertStmt.getTables(analyzer, tableMap, parentViewNameSet); } - - lock(dbs); + List<Table> tables = Lists.newArrayList(tableMap.values()); Review comment: yes, tableMap is a treeMap which is used to for previous analysis, the treeMap will keep table id in In ascending order, ---------------------------------------------------------------- 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. 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