From 69c3ea64c5b9ba33e1578b2f2728082350fb250f Mon Sep 17 00:00:00 2001 From: feiniaofeiafei Date: Fri, 3 Jan 2025 20:30:30 +0800 Subject: [PATCH] fix --- .../trees/plans/logical/LogicalRepeat.java | 19 ++----------------- .../nereids/properties/DataTraitTest.java | 3 +-- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalRepeat.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalRepeat.java index 98a5402e6ebe883..005ac35cf9913e8 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalRepeat.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/logical/LogicalRepeat.java @@ -24,7 +24,6 @@ import org.apache.doris.nereids.trees.expressions.NamedExpression; import org.apache.doris.nereids.trees.expressions.Slot; import org.apache.doris.nereids.trees.expressions.VirtualSlotReference; -import org.apache.doris.nereids.trees.expressions.literal.NullLiteral; import org.apache.doris.nereids.trees.plans.Plan; import org.apache.doris.nereids.trees.plans.PlanType; import org.apache.doris.nereids.trees.plans.algebra.Repeat; @@ -35,12 +34,9 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableList; -import java.util.HashMap; import java.util.List; -import java.util.Map; import java.util.Objects; import java.util.Optional; -import java.util.Set; /** * LogicalRepeat. @@ -194,19 +190,8 @@ public void computeUnique(DataTrait.Builder builder) { @Override public void computeUniform(DataTrait.Builder builder) { - DataTrait dataTrait = child(0).getLogicalProperties().getTrait(); - Set common = getCommonGroupingSetExpressions(); - Map> slotUniformValue = dataTrait.getSlotUniformValueMap(); - Map> newSlotUniformValue = new HashMap<>(); - for (Map.Entry> entry : slotUniformValue.entrySet()) { - Optional value = entry.getValue(); - if (!value.isPresent() || value.get() instanceof NullLiteral || common.contains(value.get())) { - newSlotUniformValue.put(entry.getKey(), value); - } else { - newSlotUniformValue.put(entry.getKey(), Optional.empty()); - } - } - builder.addUniformSlotValueMap(newSlotUniformValue); + // don't generate uniform slot + // TODO: this need be supported later } @Override diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/DataTraitTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/DataTraitTest.java index fc7f2f58eceae49..246495c659d9c62 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/DataTraitTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/properties/DataTraitTest.java @@ -242,8 +242,7 @@ void testAgg() { .rewrite() .getPlan(); System.out.println(plan.getLogicalProperties().getTrait()); - Assertions.assertTrue(plan.getLogicalProperties().getTrait().isUniform(plan.getOutput().get(0)) - && !plan.getLogicalProperties().getTrait().isUniformAndNotNull(plan.getOutput().get(0))); + // Assertions.assertTrue(plan.getLogicalProperties().getTrait().isUniform(plan.getOutput().get(0))); } @Test