From bb09bf1611094c57ef8b0653d6cd75bc758a13c3 Mon Sep 17 00:00:00 2001 From: Shylock Hg <33566796+Shylock-Hg@users.noreply.github.com> Date: Fri, 4 Nov 2022 18:54:43 +0800 Subject: [PATCH] Filter should keep column names. --- src/graph/optimizer/rule/PushFilterDownProjectRule.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/graph/optimizer/rule/PushFilterDownProjectRule.cpp b/src/graph/optimizer/rule/PushFilterDownProjectRule.cpp index 69ea357e248..d14fe98ee78 100644 --- a/src/graph/optimizer/rule/PushFilterDownProjectRule.cpp +++ b/src/graph/optimizer/rule/PushFilterDownProjectRule.cpp @@ -110,6 +110,8 @@ StatusOr PushFilterDownProjectRule::transform( auto* newBelowFilterNode = graph::Filter::make( octx->qctx(), const_cast(oldProjNode->dep()), newFilterPicked); newBelowFilterNode->setInputVar(oldProjNode->inputVar()); + // Filter should keep column names + newBelowFilterNode->setColNames(oldProjNode->inputVars()[0]->colNames); auto newBelowFilterGroup = OptGroup::create(octx); auto newFilterGroupNode = newBelowFilterGroup->makeGroupNode(newBelowFilterNode); for (auto dep : projGroupNode->dependencies()) {