From 1285bae512bff175b2f0db7c82828d35055745b4 Mon Sep 17 00:00:00 2001 From: RobinTF <83676088+RobinTF@users.noreply.github.com> Date: Wed, 26 Feb 2025 19:50:04 +0100 Subject: [PATCH] Add mirrored test case to increase coverage --- test/QueryPlannerTest.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/test/QueryPlannerTest.cpp b/test/QueryPlannerTest.cpp index e2a14d3709..dac5b7b62a 100644 --- a/test/QueryPlannerTest.cpp +++ b/test/QueryPlannerTest.cpp @@ -3037,7 +3037,7 @@ TEST(QueryPlanner, testDistributiveJoinInUnion) { "SELECT * WHERE { ?s ?o . { ?s + ?y } UNION { VALUES ?x { 1 " "} }}", h::Union( - h::TransitivePath(std::move(left3), std::move(right2), 1, + h::TransitivePath(left3, right2, 1, std::numeric_limits::max(), h::IndexScanFromStrings("?s", "", "?o"), h::IndexScanFromStrings( @@ -3046,6 +3046,20 @@ TEST(QueryPlanner, testDistributiveJoinInUnion) { h::CartesianProductJoin(h::IndexScanFromStrings("?s", "", "?o"), h::ValuesClause("VALUES (?x) { (1) }"))), qec, {4, 16, 64'000'000}); + + h::expectWithGivenBudgets( + "SELECT * WHERE { { VALUES ?x { 1 } } UNION { ?s + ?y } . " + "?s ?o }", + h::Union( + h::CartesianProductJoin(h::ValuesClause("VALUES (?x) { (1) }"), + h::IndexScanFromStrings("?s", "", "?o")), + h::TransitivePath(std::move(left3), std::move(right2), 1, + std::numeric_limits::max(), + h::IndexScanFromStrings("?s", "", "?o"), + h::IndexScanFromStrings( + "?_QLever_internal_variable_qp_0", "", + "?_QLever_internal_variable_qp_1"))), + qec, {4, 16, 64'000'000}); } // _____________________________________________________________________________