This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch branch-4.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-4.0 by this push:
new b7a789a86d3 branch-4.0: [opt](coordinator) All Command can use
NereidsCoordinator #58360 (#58561)
b7a789a86d3 is described below
commit b7a789a86d30bc2c977ca55adef11f58ffdce32e
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Dec 2 10:00:46 2025 +0800
branch-4.0: [opt](coordinator) All Command can use NereidsCoordinator
#58360 (#58561)
Cherry-picked from #58360
Co-authored-by: 924060929 <[email protected]>
---
.../java/org/apache/doris/qe/SessionVariable.java | 11 ------
.../update_use_nereids_coordinator.groovy | 39 ++++++++++++++++++++++
2 files changed, 39 insertions(+), 11 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 b200b0e8740..91e18dcb42a 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
@@ -29,7 +29,6 @@ import org.apache.doris.common.io.Writable;
import org.apache.doris.common.util.TimeUtils;
import org.apache.doris.common.util.Util;
import org.apache.doris.nereids.StatementContext;
-import org.apache.doris.nereids.analyzer.UnboundResultSink;
import org.apache.doris.nereids.glue.LogicalPlanAdapter;
import org.apache.doris.nereids.metrics.Event;
import org.apache.doris.nereids.metrics.EventSwitchParser;
@@ -37,9 +36,6 @@ import org.apache.doris.nereids.parser.Dialect;
import org.apache.doris.nereids.rules.RuleType;
import
org.apache.doris.nereids.rules.exploration.mv.PreMaterializedViewRewriter.PreRewriteStrategy;
import org.apache.doris.nereids.rules.expression.ExpressionRuleType;
-import
org.apache.doris.nereids.trees.plans.commands.insert.InsertIntoTableCommand;
-import org.apache.doris.nereids.trees.plans.logical.LogicalFileSink;
-import org.apache.doris.nereids.trees.plans.logical.LogicalPlan;
import org.apache.doris.planner.GroupCommitBlockSink;
import org.apache.doris.qe.VariableMgr.VarAttr;
import org.apache.doris.thrift.TGroupCommitMode;
@@ -4351,13 +4347,6 @@ public class SessionVariable implements Serializable,
Writable {
if (!(parsedStatement instanceof LogicalPlanAdapter)) {
return false;
}
- LogicalPlan logicalPlan = ((LogicalPlanAdapter)
parsedStatement).getLogicalPlan();
- // TODO: support other sink
- if (!(logicalPlan instanceof UnboundResultSink
- || logicalPlan instanceof LogicalFileSink
- || logicalPlan instanceof InsertIntoTableCommand)) {
- return false;
- }
}
return sessionVariable.enableNereidsDistributePlanner;
}
diff --git
a/regression-test/suites/coordinator_p0/update_use_nereids_coordinator.groovy
b/regression-test/suites/coordinator_p0/update_use_nereids_coordinator.groovy
new file mode 100644
index 00000000000..d57063ce2dc
--- /dev/null
+++
b/regression-test/suites/coordinator_p0/update_use_nereids_coordinator.groovy
@@ -0,0 +1,39 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements. See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership. The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License. You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied. See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+suite('update_use_nereids_coordinator') {
+ multi_sql """
+ set enable_nereids_distribute_planner=true;
+ set enable_sql_cache=false;
+ drop table if exists update_tbl;
+ create table if not exists update_tbl(
+ id int,
+ value int
+ )
+ unique key(id)
+ distributed by hash(id)
+ properties('replication_num'='1');
+ insert into update_tbl values(1, 1);
+ """
+
+ sql "update update_tbl set value=2 where id =1"
+
+ test {
+ sql "select * from update_tbl"
+ result([[1, 2]])
+ }
+}
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]