[fix](planner) fix show variable display wrong enable_nereids_planner value (#50746)
### What problem does this PR solve? fix show variable display wrong enable_nereids_planner value, introduced by #49913 ### Release note None ### Check List (For Author) - Test <!-- At least one of them must be included. --> - [x] Regression test - [ ] Unit Test - [ ] Manual test (add detailed scripts or steps below) - [ ] No need to test or manual test. Explain why: - [ ] This is a refactor/code format and no logic has been changed. - [ ] Previous test can cover this change. - [ ] No code files have been changed. - [ ] Other reason <!-- Add your reason? --> - Behavior changed: - [x] No. - [ ] Yes. <!-- Explain the behavior change --> - Does this need documentation? - [ ] No. - [ ] Yes. <!-- Add document PR link here. eg: https://github.com/apache/doris-website/pull/1214 --> ### Check List (For Reviewer who merge this PR) - [ ] Confirm the release note - [ ] Confirm test cases - [ ] Confirm document - [ ] Add branch pick label <!-- Add branch pick label that this PR should merge into -->
This commit is contained in:
@ -62,6 +62,7 @@ import org.apache.doris.analysis.SetType;
|
||||
import org.apache.doris.analysis.SetVar;
|
||||
import org.apache.doris.analysis.SetVar.SetVarType;
|
||||
import org.apache.doris.analysis.ShowStmt;
|
||||
import org.apache.doris.analysis.ShowVariablesStmt;
|
||||
import org.apache.doris.analysis.SqlParser;
|
||||
import org.apache.doris.analysis.SqlScanner;
|
||||
import org.apache.doris.analysis.StatementBase;
|
||||
@ -900,7 +901,8 @@ public class StmtExecutor {
|
||||
throw new TException("This is in a transaction, only insert, commit, rollback is acceptable.");
|
||||
}
|
||||
SessionVariable sessionVariable = context.getSessionVariable();
|
||||
if (!(parsedStmt instanceof SetStmt) && !(parsedStmt instanceof UnsetVariableStmt)) {
|
||||
if (!(parsedStmt instanceof SetStmt) && !(parsedStmt instanceof UnsetVariableStmt)
|
||||
&& !(parsedStmt instanceof ShowVariablesStmt)) {
|
||||
sessionVariable.disableNereidsPlannerOnce();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user