Skip to content

Commit

Permalink
[fix](query state) Print correct DML state (apache#30488)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiqiang-hhhh authored Jan 29, 2024
1 parent dbdc17c commit d5856bd
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,11 @@ public void execute(TUniqueId queryId) throws Exception {
LOG.debug("fall back to legacy planner on statement:\n{}", originStmt.originStmt);
parsedStmt = null;
planner = null;
// Attention: currently exception from nereids does not mean an Exception to user terminal
// unless user does not allow fallback to lagency planner. But state of query
// has already been set to Error in this case, it will have some side effect on profile result
// and audit log. So we need to reset state to OK if query cancel be processd by lagency.
context.getState().reset();
context.getState().setNereids(false);
executeByLegacy(queryId);
}
Expand Down

0 comments on commit d5856bd

Please sign in to comment.