Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
dataroaring committed Jul 10, 2024
1 parent 47ade42 commit d63d942
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java
Original file line number Diff line number Diff line change
Expand Up @@ -725,6 +725,12 @@ private void executeByNereids(TUniqueId queryId) throws Exception {
return;
}
}

// Query following createting table would throw table not exist error.
// For example.
// t1: client issues create table to master fe
// t2: client issues query sql to observer fe, the query would fail due to not exist table in plan phase.
// t3: observer fe receive editlog creating the table from the master fe
syncJournalIfNeeded();
try {
((Command) logicalPlan).run(context, this);
Expand Down Expand Up @@ -760,6 +766,11 @@ private void executeByNereids(TUniqueId queryId) throws Exception {
} else {
context.getState().setIsQuery(true);
// create plan
// Query following createting table would throw table not exist error.
// For example.
// t1: client issues create table to master fe
// t2: client issues query sql to observer fe, the query would fail due to not exist table in plan phase.
// t3: observer fe receive editlog creating the table from the master fe
syncJournalIfNeeded();
planner = new NereidsPlanner(statementContext);
if (context.getSessionVariable().isEnableMaterializedViewRewrite()) {
Expand Down Expand Up @@ -956,6 +967,11 @@ public void executeByLegacy(TUniqueId queryId) throws Exception {
}
}
} else {
// Query following createting table would throw table not exist error.
// For example.
// t1: client issues create table to master fe
// t2: client issues query sql to observer fe, the query would fail due to not exist table in plan phase.
// t3: observer fe receive editlog creating the table from the master fe
syncJournalIfNeeded();
analyzer = new Analyzer(context.getEnv(), context);
parsedStmt.analyze(analyzer);
Expand Down

0 comments on commit d63d942

Please sign in to comment.