| 578 | } |
| 579 | |
| 580 | Status MakeDeeplyNestedListView(std::shared_ptr<RecordBatch>* out) { |
| 581 | const int batch_length = 5; |
| 582 | auto type = int32(); |
| 583 | |
| 584 | MemoryPool* pool = default_memory_pool(); |
| 585 | std::shared_ptr<Array> array; |
| 586 | const bool include_nulls = true; |
| 587 | RETURN_NOT_OK(MakeRandomInt32Array(1000, include_nulls, pool, &array)); |
| 588 | for (int i = 0; i < 63; ++i) { |
| 589 | type = std::static_pointer_cast<DataType>(list_view(type)); |
| 590 | RETURN_NOT_OK( |
| 591 | MakeRandomListViewArray(array, batch_length, include_nulls, pool, &array)); |
| 592 | } |
| 593 | |
| 594 | auto f0 = field("f0", type); |
| 595 | auto schema = ::arrow::schema({f0}); |
| 596 | std::vector<std::shared_ptr<Array>> arrays = {array}; |
| 597 | *out = RecordBatch::Make(schema, batch_length, arrays); |
| 598 | return Status::OK(); |
| 599 | } |
| 600 | |
| 601 | Status MakeStruct(std::shared_ptr<RecordBatch>* out) { |
| 602 | // reuse constructed list columns |
no test coverage detected