| 60 | namespace acero { |
| 61 | |
| 62 | BatchesWithSchema GenerateBatchesFromString( |
| 63 | const std::shared_ptr<Schema>& schema, |
| 64 | const std::vector<std::string_view>& json_strings, int multiplicity = 1) { |
| 65 | BatchesWithSchema out_batches{{}, schema}; |
| 66 | |
| 67 | std::vector<TypeHolder> types; |
| 68 | for (auto&& field : schema->fields()) { |
| 69 | types.emplace_back(field->type()); |
| 70 | } |
| 71 | |
| 72 | for (auto&& s : json_strings) { |
| 73 | out_batches.batches.push_back(ExecBatchFromJSON(types, s)); |
| 74 | } |
| 75 | |
| 76 | size_t batch_count = out_batches.batches.size(); |
| 77 | for (int repeat = 1; repeat < multiplicity; ++repeat) { |
| 78 | for (size_t i = 0; i < batch_count; ++i) { |
| 79 | out_batches.batches.push_back(out_batches.batches[i]); |
| 80 | } |
| 81 | } |
| 82 | |
| 83 | return out_batches; |
| 84 | } |
| 85 | |
| 86 | void CheckRunOutput(JoinType type, const BatchesWithSchema& l_batches, |
| 87 | const BatchesWithSchema& r_batches, |
no test coverage detected