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

Function ASSERT_OK_AND_ASSIGN

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

Source from the content-addressed store, hash-verified

304 const AsofJoinNodeOptions& join_options,
305 const std::string& expected_error_str) {
306 ASSERT_OK_AND_ASSIGN(auto l_batches, MakeBatchesFromNumString(l_schema, {R"([])"}));
307 ASSERT_OK_AND_ASSIGN(auto r_batches, MakeBatchesFromNumString(r_schema, {R"([])"}));
308
309 return DoRunInvalidPlanTest(l_batches, r_batches, join_options, expected_error_str);
310}
311
312void DoRunInvalidPlanTest(const std::shared_ptr<Schema>& l_schema,
313 const std::shared_ptr<Schema>& r_schema, int64_t tolerance,
314 const std::string& expected_error_str) {
315 DoRunInvalidPlanTest(l_schema, r_schema,
316 GetRepeatedOptions(2, "time", {"key"}, tolerance),
317 expected_error_str);
318}
319
320void DoRunInvalidTypeTest(const std::shared_ptr<Schema>& l_schema,
321 const std::shared_ptr<Schema>& r_schema) {
322 DoRunInvalidPlanTest(l_schema, r_schema, 0, "Unsupported type for ");
323}
324
325void DoRunMissingKeysTest(const std::shared_ptr<Schema>& l_schema,
326 const std::shared_ptr<Schema>& r_schema) {
327 DoRunInvalidPlanTest(l_schema, r_schema, 0, "Bad join key on table : No match");
328}
329
330void DoRunMissingOnKeyTest(const std::shared_ptr<Schema>& l_schema,
331 const std::shared_ptr<Schema>& r_schema) {
332 DoRunInvalidPlanTest(l_schema, r_schema,
333 GetRepeatedOptions(2, "invalid_time", {"key"}, 0),
334 "Bad join key on table : No match");
335}
336
337void DoRunMissingByKeyTest(const std::shared_ptr<Schema>& l_schema,
338 const std::shared_ptr<Schema>& r_schema) {
339 DoRunInvalidPlanTest(l_schema, r_schema,
340 GetRepeatedOptions(2, "time", {"invalid_key"}, 0),
341 "Bad join key on table : No match");
342}
343
344void DoRunNestedOnKeyTest(const std::shared_ptr<Schema>& l_schema,
345 const std::shared_ptr<Schema>& r_schema) {
346 DoRunInvalidPlanTest(l_schema, r_schema, GetRepeatedOptions(2, {0, "time"}, {"key"}, 0),
347 "Bad join key on table : No match");
348}
349
350void DoRunNestedByKeyTest(const std::shared_ptr<Schema>& l_schema,
351 const std::shared_ptr<Schema>& r_schema) {
352 DoRunInvalidPlanTest(l_schema, r_schema,
353 GetRepeatedOptions(2, "time", {FieldRef{0, 1}}, 0),
354 "Bad join key on table : No match");
355}
356
357void DoRunAmbiguousOnKeyTest(const std::shared_ptr<Schema>& l_schema,
358 const std::shared_ptr<Schema>& r_schema) {
359 DoRunInvalidPlanTest(l_schema, r_schema, 0, "Bad join key on table : Multiple matches");
360}
361
362void DoRunAmbiguousByKeyTest(const std::shared_ptr<Schema>& l_schema,
363 const std::shared_ptr<Schema>& r_schema) {

Callers 5

RunMutateByKeyFunction · 0.70
RunMutateNoKeyFunction · 0.70
RunMutateNullKeyFunction · 0.70
RunMutateEmptyKeyFunction · 0.70
TestBackpressureFunction · 0.70

Calls 6

DoInvalidPlanTestFunction · 0.85
strMethod · 0.80
push_backMethod · 0.80
GetRepeatedOptionsFunction · 0.70
ifFunction · 0.50
num_fieldsMethod · 0.45

Tested by

no test coverage detected