From 93dd5add24480a289fa0029a7ea5ed25420ff112 Mon Sep 17 00:00:00 2001 From: englefly Date: Wed, 8 Nov 2023 15:04:21 +0800 Subject: [PATCH] fmt --- .../nereids/jobs/cascades/OptimizeGroupExpressionJob.java | 4 ++-- .../jobs/joinorder/hypergraph/GraphSimplifierTest.java | 8 ++++---- .../test/java/org/apache/doris/nereids/memo/RankTest.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/OptimizeGroupExpressionJob.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/OptimizeGroupExpressionJob.java index 6471f1c84e49119..8aab8f97b40a3e9 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/OptimizeGroupExpressionJob.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/cascades/OptimizeGroupExpressionJob.java @@ -73,14 +73,14 @@ private List getExplorationRules() { .getSessionVariable().getMaxJoinNumBushyTree(); if (isDisableJoinReorder) { return Collections.emptyList(); - } else if (enableLeftZigZag || !groupExpression.getOwnerGroup().isStatsReliable()) { - return getRuleSet().getLeftZigZagTreeJoinReorder(); } else if (isDpHyp) { if (isOtherJoinReorder) { return getRuleSet().getDPHypReorderRules(); } else { return Collections.emptyList(); } + } else if (enableLeftZigZag || !groupExpression.getOwnerGroup().isStatsReliable()) { + return getRuleSet().getLeftZigZagTreeJoinReorder(); } else if (isEnableBushyTree) { return getRuleSet().getBushyTreeJoinReorder(); } else if (context.getCascadesContext().getStatementContext().getMaxNAryInnerJoin() <= joinNumBushyTree) { diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/GraphSimplifierTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/GraphSimplifierTest.java index 79859ccf7aa738b..1509a259ec32d61 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/GraphSimplifierTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/jobs/joinorder/hypergraph/GraphSimplifierTest.java @@ -89,10 +89,10 @@ void testStarQuery() { .add(Pair.of(17L, 2L)) // 04 - 1 .add(Pair.of(17L, 4L)) // 04 - 2 .add(Pair.of(17L, 8L)) // 04 - 3 - .add(Pair.of(25L, 2L)) // 034 - 1 - .add(Pair.of(25L, 4L)) // 034 - 2 - .add(Pair.of(29L, 2L)) // 0234 - 1 - .build(); // 0-4-3-2-1 : big left deep tree + .add(Pair.of(19L, 8L)) // 041 - 2 + .add(Pair.of(21L, 2L)) // 042 - 1 + .add(Pair.of(23L, 8L)) // 0134 - 2 + .build(); // 0-4-3-1-2 : big left deep tree for (Pair step : steps) { if (!graphSimplifier.applySimplificationStep()) { break; diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java index ba0f4bd26c059d1..e3571395e4772c6 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/memo/RankTest.java @@ -55,7 +55,7 @@ void test() { shape.add(memo.unrank(memo.rank(i + 1).first).shape("")); } System.out.println(shape); - Assertions.assertEquals(4, shape.size()); + Assertions.assertEquals(1, shape.size()); Assertions.assertEquals(bestPlan.shape(""), memo.unrank(memo.rank(1).first).shape("")); } }