From 2358ebe338eea7ccda8d67fe8bd98a0cf4b47aac Mon Sep 17 00:00:00 2001 From: LiBinfeng <46676950+LiBinfeng-01@users.noreply.github.com> Date: Fri, 7 Jun 2024 14:47:45 +0800 Subject: [PATCH] [Fix](feut) Fix distribute hint test with reorder cross join (#35987) when checking plan shape of distribute hint test, the shape of it does not changed but projection has changed. So it needed to be updated --- .../doris/nereids/DistributeHintTest.java | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/fe/fe-core/src/test/java/org/apache/doris/nereids/DistributeHintTest.java b/fe/fe-core/src/test/java/org/apache/doris/nereids/DistributeHintTest.java index d08b0914b6..8626eb32c7 100644 --- a/fe/fe-core/src/test/java/org/apache/doris/nereids/DistributeHintTest.java +++ b/fe/fe-core/src/test/java/org/apache/doris/nereids/DistributeHintTest.java @@ -117,21 +117,20 @@ class DistributeHintTest extends TestWithFeService implements MemoPatternMatchSu MatchingUtils.assertMatches(plan, physicalResultSink( physicalDistribute( - physicalProject( - physicalHashJoin( - physicalHashJoin(physicalDistribute().when(dis -> { - DistributionSpec spec = dis.getDistributionSpec(); - Assertions.assertTrue(spec instanceof DistributionSpecHash); - DistributionSpecHash hashSpec = (DistributionSpecHash) spec; - Assertions.assertEquals(ShuffleType.EXECUTION_BUCKETED, - hashSpec.getShuffleType()); - return true; - }), physicalDistribute()), - physicalDistribute() - ).when(join -> join.getDistributeHint().distributeType == DistributeType.SHUFFLE_RIGHT) + physicalHashJoin( + physicalHashJoin(physicalDistribute().when(dis -> { + DistributionSpec spec = dis.getDistributionSpec(); + Assertions.assertTrue(spec instanceof DistributionSpecHash); + DistributionSpecHash hashSpec = (DistributionSpecHash) spec; + Assertions.assertEquals(ShuffleType.EXECUTION_BUCKETED, + hashSpec.getShuffleType()); + return true; + }), physicalDistribute()), + physicalDistribute()).when(join -> join.getDistributeHint().distributeType + == DistributeType.SHUFFLE_RIGHT) ) ) - )); + ); }); }