| 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 | |
| 312 | void 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 | |
| 320 | void 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 | |
| 325 | void 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 | |
| 330 | void 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 | |
| 337 | void 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 | |
| 344 | void 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 | |
| 350 | void 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 | |
| 357 | void 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 | |
| 362 | void DoRunAmbiguousByKeyTest(const std::shared_ptr<Schema>& l_schema, |
| 363 | const std::shared_ptr<Schema>& r_schema) { |
no test coverage detected