From a6c1a5b582cbd125f285e8f4b01610c1735f7485 Mon Sep 17 00:00:00 2001 From: minghong Date: Wed, 4 Dec 2024 18:42:31 +0800 Subject: [PATCH] leaf --- .../doris/nereids/rules/rewrite/PushDownEncodeSlot.java | 4 ++-- .../apache/doris/nereids/rules/analysis/AnalyzeCTETest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownEncodeSlot.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownEncodeSlot.java index 2e5f42fd5886ed1..4bf137cdea53c90 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownEncodeSlot.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PushDownEncodeSlot.java @@ -29,8 +29,8 @@ import org.apache.doris.nereids.trees.expressions.functions.scalar.DecodeAsVarchar; import org.apache.doris.nereids.trees.expressions.functions.scalar.EncodeString; import org.apache.doris.nereids.trees.plans.Plan; -import org.apache.doris.nereids.trees.plans.logical.LogicalCatalogRelation; import org.apache.doris.nereids.trees.plans.logical.LogicalJoin; +import org.apache.doris.nereids.trees.plans.logical.LogicalLeaf; import org.apache.doris.nereids.trees.plans.logical.LogicalProject; import org.apache.doris.nereids.trees.plans.logical.LogicalRepeat; import org.apache.doris.nereids.trees.plans.logical.LogicalSetOperation; @@ -77,7 +77,7 @@ public class PushDownEncodeSlot extends OneRewriteRuleFactory { public Rule build() { return logicalProject() .whenNot(project -> project.child() instanceof LogicalRepeat) - .when(project -> !(project.child() instanceof LogicalCatalogRelation)) + .whenNot(project -> (project.child() instanceof LogicalLeaf)) .then(project -> pushDownEncodeSlot(project)) .toRule(RuleType.PUSH_DOWN_ENCODE_SLOT); } diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/AnalyzeCTETest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/AnalyzeCTETest.java index 288208bb3f52b8b..6462b1da5714a4e 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/AnalyzeCTETest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/analysis/AnalyzeCTETest.java @@ -101,7 +101,7 @@ protected void runBeforeAll() throws Exception { SSBUtils.createTables(this); createView("CREATE VIEW V1 AS SELECT * FROM part"); createView("CREATE VIEW V2 AS SELECT * FROM part"); - connectContext.getSessionVariable().enableCompressMaterialize=false; + connectContext.getSessionVariable().enableCompressMaterialize = false; } @Override