| 435 | } |
| 436 | |
| 437 | static std::shared_ptr<Array> GenerateTestArray(int num_columns) { |
| 438 | constexpr int64_t kLength = 100; |
| 439 | |
| 440 | auto rand = random::RandomArrayGenerator(0xbeef); |
| 441 | auto schm = GenerateTestSchema(num_columns); |
| 442 | |
| 443 | ArrayVector columns(num_columns); |
| 444 | for (auto& column : columns) { |
| 445 | column = rand.Int64(kLength, 0, std::numeric_limits<int64_t>::max()); |
| 446 | } |
| 447 | |
| 448 | return *StructArray::Make(columns, schm->fields()); |
| 449 | } |
| 450 | |
| 451 | static std::shared_ptr<RecordBatch> ToBatch(const std::shared_ptr<Array>& array) { |
| 452 | return *RecordBatch::FromStructArray(array); |
no test coverage detected