apache / apache/arrow

[C++] Add a VisitIntegerType helper

Open
#50,595 6 comments 0 reactions 1 assignee Claimed by @goel-skd View on GitHub
Component: C++ good-first-issue good-second-issue Type: enhancement
Dominant language
C++
Stars
17.1k
Forks
4.3k
Avg merge
3d 13h
Merged PRs (30d)
88

Description

### Describe the enhancement requested

In `visit_type_inline.h` we have a `VisitType` that dispatches all existing data types to a generic callable (presumably a lambda or template function).

It would be useful to have a similar `VisitIntegerType` helper that assumes its input is an integer type. This would help implementing helpers for dictionary indices, take indices, etc.

For example this snippet could be reimplemented more tersely using said helper:
https://github.com/apache/arrow/blob/154962c364bc210c10ef16680f54a115b624b400/cpp/src/arrow/util/dict_util.cc#L61-L79

### Component(s)

C++

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.