MCPcopy Create free account
hub / github.com/apache/arrow / DoInvalidPlanTest

Function DoInvalidPlanTest

cpp/src/arrow/acero/asof_join_node_test.cc:272–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

270}
271
272void DoInvalidPlanTest(const BatchesWithSchema& l_batches,
273 const BatchesWithSchema& r_batches,
274 const AsofJoinNodeOptions& join_options,
275 const std::string& expected_error_str,
276 bool fail_on_plan_creation = false) {
277 ASSERT_OK_AND_ASSIGN(auto plan, ExecPlan::Make(*threaded_exec_context()));
278
279 Declaration join{"asofjoin", join_options};
280 join.inputs.emplace_back(Declaration{
281 "source", SourceNodeOptions{l_batches.schema, l_batches.gen(false, false)}});
282 join.inputs.emplace_back(Declaration{
283 "source", SourceNodeOptions{r_batches.schema, r_batches.gen(false, false)}});
284
285 if (fail_on_plan_creation) {
286 EXPECT_RAISES_WITH_MESSAGE_THAT(
287 Invalid, ::testing::HasSubstr(expected_error_str),
288 DeclarationToStatus(std::move(join), /*use_threads=*/false));
289 } else {
290 EXPECT_RAISES_WITH_MESSAGE_THAT(Invalid, ::testing::HasSubstr(expected_error_str),
291 join.AddToPlan(plan.get()));
292 }
293}
294
295void DoRunInvalidPlanTest(const BatchesWithSchema& l_batches,
296 const BatchesWithSchema& r_batches,

Callers 2

DoRunInvalidPlanTestFunction · 0.85
ASSERT_OK_AND_ASSIGNFunction · 0.85

Calls 5

DeclarationToStatusFunction · 0.85
emplace_backMethod · 0.80
AddToPlanMethod · 0.80
genMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected