From 9383731b5676272f55d819b03040bf01b0a6d068 Mon Sep 17 00:00:00 2001 From: Calvin Kirs Date: Mon, 3 Aug 2026 17:23:18 +0800 Subject: [PATCH] branch-4.0: [chore](session-variable) remove the unused session variable plan_nereids_dump Cherry-pick of #66371. Adapted for branch-4.0: this branch has no VariableMgr.REMOVED_SESSION_VAR_NAMES compatibility list, so only the SessionVariable part is picked. `SET plan_nereids_dump = ...` therefore reports ERR_UNKNOWN_SYSTEM_VARIABLE on this branch instead of being silently ignored. Replaying an old global-variable edit log or image entry is unaffected: VariableMgr.replayGlobalVariableV2 logs and skips unknown variable names. (cherry picked from commit e308b6a2e8cbefca930244f362a4cf382e5f13c1) --- .../main/java/org/apache/doris/qe/SessionVariable.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java index 80c89a3fba5f95..03735c7511b23f 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java +++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java @@ -508,8 +508,6 @@ public class SessionVariable implements Serializable, Writable { public static final String TRACE_NEREIDS = "trace_nereids"; - public static final String PLAN_NEREIDS_DUMP = "plan_nereids_dump"; - public static final String DUMP_NEREIDS_MEMO = "dump_nereids_memo"; // fix replica to query. If num = 1, query the smallest replica, if 2 is the second smallest replica. @@ -2209,8 +2207,10 @@ public boolean isEnableHboNonStrictMatchingMode() { @VariableMgr.VarAttr(name = TRACE_NEREIDS) public boolean traceNereids = false; - @VariableMgr.VarAttr(name = PLAN_NEREIDS_DUMP) - public boolean planNereidsDump = false; + // Internal state, not a session variable: it is turned on only by MinidumpUtils while replaying + // a minidump file (PLAY ''), where tables and statistics come from the dump instead of + // the catalog. It is intentionally not settable through SET, not forwarded and not serialized. + private boolean planNereidsDump = false; // If set to true, all query will be executed without returning result @VariableMgr.VarAttr(name = DRY_RUN_QUERY, needForward = true)