felipecrv commented on code in PR #41092:
URL: https://github.com/apache/arrow/pull/41092#discussion_r1558128222
##########
cpp/src/arrow/array/array_nested.cc:
##########
@@ -216,12 +216,26 @@ static std::shared_ptr<Array> SliceArrayWithOffsets(const
Array& array, int64_t
return array.Slice(begin, end - begin);
}
+namespace {
+struct FlattenWithRecursion {
+ // Flatten all list-like types array recursively
+ static Result<std::shared_ptr<Array>> Flatten(const Array& array, bool
with_recursion,
+ MemoryPool* memory_pool);
+};
+} // namespace
Review Comment:
You can declare `ARROW_EXPORT Result<std::shared_ptr<Array>>
FlattenLogicalListRecursively(const Array& array, MemoryPool *memory_pool)` in
`array_nested.h` right after `SetListData` in the `namespace internal`.
https://github.com/apache/arrow/blob/dbedcfce79f221e9217ec34725668a686c6d4478/cpp/src/arrow/array/array_nested.h#L51-L59
This will allow `VarLengthListLikeArray<>` and `FixedSizeListArray` to call
it from the header as I described in
https://github.com/apache/arrow/pull/41092/files#r1558109424
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]