From 74852318a9f50530f8bd00afe6b0b0a6e838c4a1 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) (cherry picked from commit 0fda4b4a97449ce34e9e8d2fb0052f26ebe78d42) (cherry picked from commit e0b6f763b937d17d0faeca498ccfa829fcb4c65c) (cherry picked from commit 7de641d5eb1df88ec0bdf116b74613864b775102) (cherry picked from commit 0cd544c99ecdf48c5576518ab4283b068da23120) (cherry picked from commit 531aa824dabfa4a5459bc47c5d283bc734b63628) (cherry picked from commit 9841cf29fdcd8dfbcb838828981bfaf52b0fa254) (cherry picked from commit 3ddade3ed7963b6816477849464ea021b9934c64) (cherry picked from commit 1240fda3f6291ff391f2d9c6f624b7bd5189d269) (cherry picked from commit 4c65d3128138eac7e64099c99adbfadda44651ac) (cherry picked from commit 1048875c720e893a2f23df55446b2a2d545e251c) --- src/Interpreters/ActionsDAG.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Interpreters/ActionsDAG.cpp b/src/Interpreters/ActionsDAG.cpp index 528dade25ae3..de2adf3f9ada 100644 --- a/src/Interpreters/ActionsDAG.cpp +++ b/src/Interpreters/ActionsDAG.cpp @@ -1762,6 +1762,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) {