MCPcopy Create free account
hub / github.com/apache/arrow / MakeDeeplyNestedListView

Function MakeDeeplyNestedListView

cpp/src/arrow/ipc/test_common.cc:580–599  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

578}
579
580Status 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
601Status MakeStruct(std::shared_ptr<RecordBatch>* out) {
602 // reuse constructed list columns

Callers 1

TEST_FFunction · 0.85

Calls 8

default_memory_poolFunction · 0.85
MakeRandomInt32ArrayFunction · 0.85
list_viewFunction · 0.85
MakeRandomListViewArrayFunction · 0.85
schemaFunction · 0.70
fieldFunction · 0.50
MakeFunction · 0.50
OKFunction · 0.50

Tested by

no test coverage detected