| 246 | } |
| 247 | |
| 248 | void CheckRunOutput(const BatchesWithSchema& l_batches, |
| 249 | const BatchesWithSchema& r0_batches, |
| 250 | const BatchesWithSchema& r1_batches, |
| 251 | const BatchesWithSchema& exp_batches, |
| 252 | const AsofJoinNodeOptions join_options, |
| 253 | std::function<void(const Table&, const Table&)> check_tables) { |
| 254 | Declaration join{"asofjoin", join_options}; |
| 255 | |
| 256 | join.inputs.emplace_back(Declaration{ |
| 257 | "source", SourceNodeOptions{l_batches.schema, l_batches.gen(false, false)}}); |
| 258 | join.inputs.emplace_back(Declaration{ |
| 259 | "source", SourceNodeOptions{r0_batches.schema, r0_batches.gen(false, false)}}); |
| 260 | join.inputs.emplace_back(Declaration{ |
| 261 | "source", SourceNodeOptions{r1_batches.schema, r1_batches.gen(false, false)}}); |
| 262 | |
| 263 | ASSERT_OK_AND_ASSIGN(auto res_table, |
| 264 | DeclarationToTable(std::move(join), /*use_threads=*/false)); |
| 265 | |
| 266 | ASSERT_OK_AND_ASSIGN(auto exp_table, |
| 267 | TableFromExecBatches(exp_batches.schema, exp_batches.batches)); |
| 268 | |
| 269 | check_tables(*exp_table, *res_table); |
| 270 | } |
| 271 | |
| 272 | void DoInvalidPlanTest(const BatchesWithSchema& l_batches, |
| 273 | const BatchesWithSchema& r_batches, |
no test coverage detected