Skip to content

Commit

Permalink
Add mirrored test case to increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinTF committed Feb 26, 2025
1 parent a39ca0e commit 1285bae
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/QueryPlannerTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3037,7 +3037,7 @@ TEST(QueryPlanner, testDistributiveJoinInUnion) {
"SELECT * WHERE { ?s <P31> ?o . { ?s <P279>+ ?y } UNION { VALUES ?x { 1 "
"} }}",
h::Union(
h::TransitivePath(std::move(left3), std::move(right2), 1,
h::TransitivePath(left3, right2, 1,
std::numeric_limits<size_t>::max(),
h::IndexScanFromStrings("?s", "<P31>", "?o"),
h::IndexScanFromStrings(
Expand All @@ -3046,6 +3046,20 @@ TEST(QueryPlanner, testDistributiveJoinInUnion) {
h::CartesianProductJoin(h::IndexScanFromStrings("?s", "<P31>", "?o"),
h::ValuesClause("VALUES (?x) { (1) }"))),
qec, {4, 16, 64'000'000});

h::expectWithGivenBudgets(
"SELECT * WHERE { { VALUES ?x { 1 } } UNION { ?s <P279>+ ?y } . "
"?s <P31> ?o }",
h::Union(
h::CartesianProductJoin(h::ValuesClause("VALUES (?x) { (1) }"),
h::IndexScanFromStrings("?s", "<P31>", "?o")),
h::TransitivePath(std::move(left3), std::move(right2), 1,
std::numeric_limits<size_t>::max(),
h::IndexScanFromStrings("?s", "<P31>", "?o"),
h::IndexScanFromStrings(
"?_QLever_internal_variable_qp_0", "<P279>",
"?_QLever_internal_variable_qp_1"))),
qec, {4, 16, 64'000'000});
}

// _____________________________________________________________________________
Expand Down

0 comments on commit 1285bae

Please sign in to comment.