| 558 | } |
| 559 | |
| 560 | Status MakeDeeplyNestedList(std::shared_ptr<RecordBatch>* out) { |
| 561 | const int batch_length = 5; |
| 562 | auto type = int32(); |
| 563 | |
| 564 | MemoryPool* pool = default_memory_pool(); |
| 565 | std::shared_ptr<Array> array; |
| 566 | const bool include_nulls = true; |
| 567 | RETURN_NOT_OK(MakeRandomInt32Array(1000, include_nulls, pool, &array)); |
| 568 | for (int i = 0; i < 63; ++i) { |
| 569 | type = std::static_pointer_cast<DataType>(list(type)); |
| 570 | RETURN_NOT_OK(MakeRandomListArray(array, batch_length, include_nulls, pool, &array)); |
| 571 | } |
| 572 | |
| 573 | auto f0 = field("f0", type); |
| 574 | auto schema = ::arrow::schema({f0}); |
| 575 | std::vector<std::shared_ptr<Array>> arrays = {array}; |
| 576 | *out = RecordBatch::Make(schema, batch_length, arrays); |
| 577 | return Status::OK(); |
| 578 | } |
| 579 | |
| 580 | Status MakeDeeplyNestedListView(std::shared_ptr<RecordBatch>* out) { |
| 581 | const int batch_length = 5; |
no test coverage detected