[C++] Add concrete ArraySpan classes
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the enhancement requested
`ArraySpan` is a lighter-weight facility that `ArrayData` and `Array`, but it does not expose as many helpers, making it uneasy to use efficiently inside compute kernels.
Perhaps we should add concrete classes providing additional behaviour around `ArraySpan`, for example:
```c++
class ConcreteArraySpan {
protected:
ArraySpan* span;
public:
ConcreteArraySpan(const ArraySpan& span) : span(&span) {}
};
template
class NumericArraySpan : public ConcreteArraySpan {
ArraySpan* span;
public:
using value_type = typename TypeClass::c_type;
using ConcreteArraySpan::ConcreteArraySpan;
bool IsValid(int64_t index) const { ... }
value_type GetView(int64_t index) const { ... }
};
class BinaryArraySpan {
...
bool IsValid(int64_t index) const { ... }
std::string_view GetView(int64_t index) const { ... }
}
```
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.