| 449 | } |
| 450 | |
| 451 | static std::shared_ptr<Array> GenerateTestArray(int num_columns) { |
| 452 | constexpr int64_t kLength = 100; |
| 453 | |
| 454 | auto rand = random::RandomArrayGenerator(0xbeef); |
| 455 | auto schm = GenerateTestSchema(num_columns); |
| 456 | |
| 457 | ArrayVector columns(num_columns); |
| 458 | for (auto& column : columns) { |
| 459 | column = rand.Int64(kLength, 0, std::numeric_limits<int64_t>::max()); |
| 460 | } |
| 461 | |
| 462 | return *StructArray::Make(columns, schm->fields()); |
| 463 | } |
| 464 | |
| 465 | static std::shared_ptr<RecordBatch> ToBatch(const std::shared_ptr<Array>& array) { |
| 466 | return *RecordBatch::FromStructArray(array); |
no test coverage detected