From 4ee09d69507acb6e4a2db9d0a0b84a8ce39db581 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=89=AC?= <654010905@qq.com> Date: Tue, 20 Feb 2024 22:26:50 +0800 Subject: [PATCH] [GLUTEN-4723]Fix issue of actions dag split (#482) (cherry picked from commit 21fa961548b04b10122da85a36d11c4b59f6316c) --- src/Interpreters/ActionsDAG.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Interpreters/ActionsDAG.cpp b/src/Interpreters/ActionsDAG.cpp index 8388ced8b560..8558cd23f806 100644 --- a/src/Interpreters/ActionsDAG.cpp +++ b/src/Interpreters/ActionsDAG.cpp @@ -1884,6 +1884,10 @@ ActionsDAG::SplitResult ActionsDAG::split(std::unordered_set split } } + /// All input nodes are needed by split to make sure first DAG and initial DAG have equal inputs, + for (const auto * input: inputs) + data[input].needed_by_split_node = true; + /// DFS. Move nodes to one of the DAGs. for (const auto & node : nodes) {