| 276 | } |
| 277 | |
| 278 | BatchesWithSchema MakeRandomBatches(const std::shared_ptr<Schema>& schema, |
| 279 | int num_batches, int batch_size, int64_t alignment, |
| 280 | MemoryPool* memory_pool) { |
| 281 | BatchesWithSchema out; |
| 282 | |
| 283 | random::RandomArrayGenerator rng(42); |
| 284 | out.batches.resize(num_batches); |
| 285 | |
| 286 | for (int i = 0; i < num_batches; ++i) { |
| 287 | out.batches[i] = |
| 288 | ExecBatch(*rng.BatchOf(schema->fields(), batch_size, alignment, memory_pool)); |
| 289 | } |
| 290 | |
| 291 | out.schema = schema; |
| 292 | return out; |
| 293 | } |
| 294 | |
| 295 | Result<BatchesWithSchema> MakeIntegerBatches( |
| 296 | const std::vector<std::function<int64_t(int)>>& gens, |
no test coverage detected