Skip to content
This repository was archived by the owner on Oct 10, 2025. It is now read-only.

Commit 955c24b

Browse files
committed
Add test for hash join flatten fix
1 parent 3522158 commit 955c24b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/planner/plan/plan_subquery.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ void Planner::planRegularMatch(const QueryGraphCollection& queryGraphCollection,
230230
[&joinNodeIDs](LogicalPlan& leftPlan, LogicalPlan& rightPlan) {
231231
return CostModel::computeHashJoinCost(joinNodeIDs, leftPlan, rightPlan);
232232
});
233-
// appendHashJoin(joinNodeIDs, JoinType::INNER, leftPlan, *rightPlan, leftPlan);
234233
}
235234
}
236235
for (auto& predicate : predicatesToPullUp) {

test/test_files/agg/multi_query_part.test

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,13 @@ Bob|Dan|3
9696
Dan|Alice|3
9797
Dan|Bob|3
9898
Dan|Carol|3
99+
100+
# If the aggregation happens on the build side of the join
101+
# A flatten will needed to be appended to the probe side
102+
# Otherwise we will have the incorrect number of results
103+
-LOG GroupByMultiQueryTest8
104+
-STATEMENT MATCH (a:person)-[k1:knows]->(b:person) WITH a, b, COUNT(*) AS s
105+
MATCH (c:person)-[k2:knows]->(a) WITH c, s
106+
MATCH (c) WHERE c.ID = 0 RETURN COUNT(*)
107+
---- 1
108+
9

0 commit comments

Comments
 (0)