Skip to content

Commit

Permalink
fix ut
Browse files Browse the repository at this point in the history
  • Loading branch information
englefly committed Nov 27, 2024
1 parent 5e1f661 commit eae497f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public List<Rule> buildRules() {
return !funcs.isEmpty() && funcs.stream()
.allMatch(f -> (f instanceof Min || f instanceof Max || f instanceof Sum
|| f instanceof Count && !f.isDistinct()
&& f.child(0) instanceof Slot));
&& (f.children().isEmpty() || f.child(0) instanceof Slot)));
})
.thenApply(ctx -> {
Set<Integer> enableNereidsRules = ctx.cascadesContext.getConnectContext()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,11 @@ void testSingleCountStar() {
.applyTopDown(new PushDownAggThroughJoinOneSide())
.printlnTree()
.matches(
logicalAggregate(
logicalJoin(
logicalOlapScan(),
logicalJoin(
logicalAggregate(
logicalOlapScan()
)
),
logicalOlapScan()
)
);
}
Expand All @@ -346,11 +346,9 @@ void testBothSideCountAndCountStar() {
PlanChecker.from(MemoTestUtils.createConnectContext(), plan)
.applyTopDown(new PushDownAggThroughJoinOneSide())
.matches(
logicalAggregate(
logicalJoin(
logicalOlapScan(),
logicalOlapScan()
)
logicalJoin(
logicalAggregate(logicalOlapScan()),
logicalAggregate(logicalOlapScan())
)
);
}
Expand Down

0 comments on commit eae497f

Please sign in to comment.