[fix](query state) Print correct DML state (#30489)

This commit is contained in:
zhiqiang
2024-01-29 15:01:46 +08:00
committed by yiguolei
parent b91a338bce
commit 90c0806178

View File

@ -502,6 +502,11 @@ public class StmtExecutor {
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);
}