[C++][IPC] Consider validation of index sizes in SparseCSFIndex::Make
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the enhancement requested
Currently `SparseCSFIndex::Make` (`cpp/src/arrow/sparse_tensor.cc`) builds the index tensors from `indices_shapes` without validation:
```cpp
indptr[i] = std::make_shared(indptr_type, indptr_data[i],
std::vector({indices_shapes[i] + 1}));
...
indices[i] = std::make_shared(indices_type, indices_data[i],
std::vector({indices_shapes[i]}));
```
Review what validation and place would be best.
### Component(s)
C++
Contributor guide
Research direction
Start in cpp/src/arrow/sparse_tensor.cc at SparseCSFIndex::Make and trace how indices_shapes, indptr_data, and indices_data are used to construct the index tensors. Determine which index-size conditions should be validated and where that validation belongs; done means invalid sizes are rejected consistently before the tensors are built.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100