NVIDIA / NVIDIA/cudf

[FEA] Add an internal utility API to return an offsets column of a sliced column starting with zero

Open
#9,256 5 comments 2 reactions 1 assignee Claimed by @ttnghia View on GitHub
feature request improvement libcudf non-breaking
Dominant language
C++
Stars
9.8k
Forks
1.1k
Avg merge
3d 6m
Merged PRs (30d)
278

Description

For nested sliced columns that have an offsets column child, their offsets columns may contain values that do not start from zero. For example:
```
offsets = [5, 7, 20, ...]
```

Many operations on these sliced columns need to generate an output offsets column that starts with zero. For example, with the input column having offsets given above, the output offsets column should be:
```
offsets = [0, 2, 13, ...]
```
Such output offsets column is generated simply by subtracting all the values with the first value. Yes, very simple.

I would like to have an internal API implementing this feature. Currently, there are several other APIs using it by implementing private code in their `.cu` files. For example:
* `lists/segmented_sort.cu`
* `lists/drop_list_duplicates` (FYI: https://github.com/rapidsai/cudf/pull/9202#discussion_r712266408)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.