felipecrv commented on issue #34535:
URL: https://github.com/apache/arrow/issues/34535#issuecomment-1965431882
>> That and the fact that you would have to type the functions based on all
the types that are used to represent an array of >> array chunks.
>
> I'm sorry, I'm not quite sure I understood this part. Could you clarify?
The resolution depends on what chunked thing you're targetting:
```cpp
explicit ChunkResolver(const ArrayVector& chunks);
explicit ChunkResolver(const std::vector<const Array*>& chunks);
explicit ChunkResolver(const RecordBatchVector& batches);
```
This is the problem (code from your proposal):
```cpp
template <typename ArrayType = Array>
class ChunkResolver {
```
Now it becomes impossible to have a non-inline function [1] in the
`ChunkResolver` because the entire class is a template. That's why these
abstractions are separate. Care was taken to allow `ChunkResolver` to work for
any type by making it deal with chunks in terms of lengths and offsets.
[1] I have a plan to add batched/vectorized versions of
`ChunkResolver::Resolve` with most of the code living in the (to be added)
`chunk_resolver.cc`
--
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]