From 896ebc767f0bc286ebdc465cdefc313dab98e8c7 Mon Sep 17 00:00:00 2001 From: 924060929 <924060929@qq.com> Date: Wed, 7 Aug 2024 10:24:53 +0800 Subject: [PATCH] fix --- .../nereids/rules/exploration/mv/PredicatesSplitter.java | 8 ++++---- .../nereids/rules/expression/PredicatesSplitterTest.java | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/PredicatesSplitter.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/PredicatesSplitter.java index f1c0ae8f96a0cee..f7182eeab7386c0 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/PredicatesSplitter.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/exploration/mv/PredicatesSplitter.java @@ -28,7 +28,7 @@ import org.apache.doris.nereids.trees.expressions.visitor.DefaultExpressionVisitor; import org.apache.doris.nereids.util.ExpressionUtils; -import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.List; import java.util.Set; @@ -39,9 +39,9 @@ */ public class PredicatesSplitter { - private final Set equalPredicates = new HashSet<>(); - private final Set rangePredicates = new HashSet<>(); - private final Set residualPredicates = new HashSet<>(); + private final Set equalPredicates = new LinkedHashSet<>(); + private final Set rangePredicates = new LinkedHashSet<>(); + private final Set residualPredicates = new LinkedHashSet<>(); private final List conjunctExpressions; public PredicatesSplitter(Expression target) { diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/expression/PredicatesSplitterTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/expression/PredicatesSplitterTest.java index 56c0a6b8341b708..0374244ce56474d 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/expression/PredicatesSplitterTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/rules/expression/PredicatesSplitterTest.java @@ -61,7 +61,7 @@ private void assetEquals(String expression, String expectedRangeExpr, String expectedResidualExpr) { - Map mem = Maps.newHashMap(); + Map mem = Maps.newLinkedHashMap(); Expression targetExpr = replaceUnboundSlot(PARSER.parseExpression(expression), mem); SplitPredicate splitPredicate = Predicates.splitPredicates(targetExpr);