This is an automated email from the ASF dual-hosted git repository.
morrysnow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 39c57203513 [chore](Nereids) turn on nereids dml when update to 2.1
(#30776)
39c57203513 is described below
commit 39c57203513992872858ba6676aaf02903f9b461
Author: morrySnow <[email protected]>
AuthorDate: Sun Feb 4 10:43:33 2024 +0800
[chore](Nereids) turn on nereids dml when update to 2.1 (#30776)
---
.../src/main/java/org/apache/doris/catalog/Env.java | 4 ++++
.../main/java/org/apache/doris/qe/VariableMgr.java | 20 ++++++++++++++++++++
2 files changed, 24 insertions(+)
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
index fefe9cbd110..d74b45cbf27 100755
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Env.java
@@ -1507,6 +1507,10 @@ public class Env {
VariableMgr.enableNereidsPlanner();
LOG.info("upgrade FE from 1.x to 2.x, set
enable_nereids_planner to new default value: true");
}
+ if (journalVersion <= FeMetaVersion.VERSION_123) {
+ VariableMgr.enableNereidsDml();
+ LOG.info("upgrade FE from 2.0 to 2.1, set enable_nereids_dml
to new default value: true");
+ }
}
getPolicyMgr().createDefaultStoragePolicy();
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java
b/fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java
index 399170865cd..aa509fd0fd6 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/VariableMgr.java
@@ -435,6 +435,26 @@ public class VariableMgr {
}
}
+ public static void enableNereidsDml() {
+ wlock.lock();
+ try {
+ VarContext ctx =
ctxByVarName.get(SessionVariable.ENABLE_NEREIDS_DML);
+ try {
+ setValue(ctx.getObj(), ctx.getField(), String.valueOf(true));
+ } catch (DdlException e) {
+ LOG.warn("failed to set global variable: {}",
SessionVariable.ENABLE_NEREIDS_DML, e);
+ return;
+ }
+
+ // write edit log
+ GlobalVarPersistInfo info = new
GlobalVarPersistInfo(defaultSessionVariable,
+ Lists.newArrayList(SessionVariable.ENABLE_NEREIDS_DML));
+ Env.getCurrentEnv().getEditLog().logGlobalVariableV2(info);
+ } finally {
+ wlock.unlock();
+ }
+ }
+
public static void setLowerCaseTableNames(int mode) throws DdlException {
VarContext ctx =
ctxByVarName.get(GlobalVariable.LOWER_CASE_TABLE_NAMES);
setGlobalVarAndWriteEditLog(ctx,
GlobalVariable.LOWER_CASE_TABLE_NAMES, "" + mode);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]