[ https://issues.apache.org/jira/browse/ARROW-602?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17458338#comment-17458338 ]
Antoine Pitrou commented on ARROW-602: -------------------------------------- There will be an API and code organization aspect to this. * API question: there are no typed subclasses for {{ChunkedArray}}, so we need another solution than simply putting {{begin()}} and {{end()}} methods on ChunkedArray * code organization issue: we don't want {{chunked_array.h}} to imply the inclusion of all type-specific array declarations, so probably need another solution My proposal would be to add a generic function {{Iterate<Type>}} in {{stl_iterator.h}}: {code:c++} template <Type> <some return type> Iterate(const Array&) { ... } template <Type> <some return type> Iterate(const ChunkedArray&) { ... } {code} Writing the implementation should be reasonably easy. > [C++] Provide iterator access to primitive elements inside a > Column/ChunkedArray > -------------------------------------------------------------------------------- > > Key: ARROW-602 > URL: https://issues.apache.org/jira/browse/ARROW-602 > Project: Apache Arrow > Issue Type: Improvement > Components: C++ > Reporter: Uwe Korn > Priority: Major > Labels: beginner, good-first-issue, newbie > Fix For: 7.0.0 > > > Given a ChunkedArray, an Arrow user must currently iterate over all its > chunks and then cast them to their types to extract the primitive memory > regions to access the values. A convenient way to access the underlying > values would be to offer a function that takes a ChunkedArray and returns a > C++ iterator over all elements. > While this may not be the most performant way to access the underlying data, > it should have sufficient performance and adds a convenience layer for new > users. -- This message was sent by Atlassian Jira (v8.20.1#820001)