diff --git a/src/engine/SpatialJoin.cpp b/src/engine/SpatialJoin.cpp index 0ae1b0d33c..169999f11a 100644 --- a/src/engine/SpatialJoin.cpp +++ b/src/engine/SpatialJoin.cpp @@ -299,7 +299,7 @@ PreparedSpatialJoinParams SpatialJoin::prepareJoin() const { Result SpatialJoin::computeResult([[maybe_unused]] bool requestLaziness) { AD_CONTRACT_CHECK( isConstructed(), - "SpatialJoin cannot be computed because at least one child is missing."); + "SpatialJoin needs two children, but at least one is missing"); SpatialJoinAlgorithms algorithms{_executionContext, prepareJoin(), config_}; if (config_->algo_ == SpatialJoinAlgorithm::BASELINE) { return algorithms.BaselineAlgorithm(); diff --git a/test/engine/SpatialJoinTest.cpp b/test/engine/SpatialJoinTest.cpp index 844b2d5c33..ea671661d2 100644 --- a/test/engine/SpatialJoinTest.cpp +++ b/test/engine/SpatialJoinTest.cpp @@ -166,12 +166,12 @@ TEST(SpatialJoin, getChildren) { std::shared_ptr op = spatialJoinOperation->getRootOperation(); SpatialJoin* spatialJoin = static_cast(op.get()); - ASSERT_ANY_THROW(spatialJoin->getChildren()); + ASSERT_EQ(spatialJoin->getChildren().size(), 0); auto spJoin1 = spatialJoin->addChild(leftChild, point1.getVariable()); spatialJoin = static_cast(spJoin1.get()); - ASSERT_ANY_THROW(spatialJoin->getChildren()); + ASSERT_EQ(spatialJoin->getChildren().size(), 1); auto spJoin2 = spatialJoin->addChild(rightChild, point2.getVariable()); spatialJoin = static_cast(spJoin2.get());