This is an automated email from the ASF dual-hosted git repository. amashenkov pushed a commit to branch ignite-21580 in repository https://gitbox.apache.org/repos/asf/ignite-3.git
commit 677ac061c5718c8146f0d94d347e33880bcab130 Author: amashenkov <andrey.mashen...@gmail.com> AuthorDate: Fri Mar 29 19:24:17 2024 +0300 Fix tests --- .../sql/engine/planner/AggregatePlannerTest.java | 16 ++++++---------- .../planner/MapReduceSortAggregatePlannerTest.java | 5 +---- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/AggregatePlannerTest.java b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/AggregatePlannerTest.java index ae8bec9b37..d3ab2e6750 100644 --- a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/AggregatePlannerTest.java +++ b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/AggregatePlannerTest.java @@ -468,7 +468,7 @@ public class AggregatePlannerTest extends AbstractAggregatePlannerTest { Predicate<AggregateCall> countReduce = (a) -> Objects.equals(a.getAggregation().getName(), "$SUM0") && a.getArgList().equals(List.of(1)); - Predicate<RelNode> nonColocatedGroupBy = hasChildThat(isInstanceOf(IgniteReduceHashAggregate.class) + Predicate<RelNode> nonColocatedGroupBy = nodeOrAnyChild(isInstanceOf(IgniteReduceHashAggregate.class) .and(in -> hasAggregates(countReduce).test(in.getAggregateCalls())) .and(input(isInstanceOf(IgniteExchange.class) .and(input(isInstanceOf(IgniteMapHashAggregate.class) @@ -809,15 +809,11 @@ public class AggregatePlannerTest extends AbstractAggregatePlannerTest { private void checkCountDistinctHash(TestCase testCase) throws Exception { assertPlan(testCase, nodeOrAnyChild(isInstanceOf(IgniteColocatedHashAggregate.class) - .and(nodeOrAnyChild(isInstanceOf(IgniteReduceHashAggregate.class) - .and(hasGroupSets(IgniteReduceHashAggregate::getGroupSets, 0)) - .and(input(isInstanceOf(IgniteExchange.class) - .and(hasDistribution(single()) - .and(input(isInstanceOf(IgniteMapHashAggregate.class) - .and(hasGroupSets(IgniteMapHashAggregate::getGroupSets, 1)) - )) - ) - )) + .and(hasNoGroupSets(IgniteColocatedHashAggregate::getGroupSets)) + .and(hasAggregate()) + .and(hasDistinctAggregate()) + .and(input(isInstanceOf(IgniteExchange.class) + .and(hasDistribution(single())) )) )); } diff --git a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/MapReduceSortAggregatePlannerTest.java b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/MapReduceSortAggregatePlannerTest.java index 5329cccbc0..578e8be72f 100644 --- a/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/MapReduceSortAggregatePlannerTest.java +++ b/modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/MapReduceSortAggregatePlannerTest.java @@ -520,13 +520,10 @@ public class MapReduceSortAggregatePlannerTest extends AbstractAggregatePlannerT Predicate<IgniteReduceSortAggregate> inputAgg = isInstanceOf(IgniteReduceSortAggregate.class) .and(hasGroupSets(IgniteReduceSortAggregate::getGroupSets, 0)) .and(hasCollation(RelCollations.of(0))) - .and(input(isInstanceOf(IgniteExchange.class) - .and(hasCollation(RelCollations.of(0))) - .and(hasDistribution(single())) .and(input(isInstanceOf(IgniteMapSortAggregate.class) .and(hasCollation(RelCollations.of(1))) .and(hasGroupSets(Aggregate::getGroupSets, 1)) - )))); + )); assertPlan(TestCase.CASE_24_1, nodeOrAnyChild(isInstanceOf(IgniteReduceSortAggregate.class) .and(hasNoGroupSets(IgniteReduceSortAggregate::getGroupSets))