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

Function ListFlatten

cpp/src/arrow/compute/kernels/vector_nested.cc:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39
40template <typename Type>
41Status ListFlatten(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) {
42 auto recursive = OptionsWrapper<ListFlattenOptions>::Get(ctx).recursive;
43 typename TypeTraits<Type>::ArrayType list_array(batch[0].array.ToArrayData());
44
45 auto pool = ctx->memory_pool();
46 ARROW_ASSIGN_OR_RAISE(auto result, (recursive ? list_array.FlattenRecursively(pool)
47 : list_array.Flatten(pool)));
48
49 out->value = std::move(result->data());
50 return Status::OK();
51}
52
53struct ListParentIndicesArray {
54 KernelContext* ctx;

Callers

nothing calls this directly

Calls 5

ToArrayDataMethod · 0.80
GetFunction · 0.50
OKFunction · 0.50
memory_poolMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected