[ 
https://issues.apache.org/jira/browse/ARROW-17289?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17574421#comment-17574421
 ] 

Yaron Gvili commented on ARROW-17289:
-------------------------------------

This is a small improvement proposal for convenience. Given a 
`std::shared_ptr<DataType> type`, it's easy for the user to find 
`IsIntegerType(type)`. IIUC, using `type_traits.h` the code would be 
`is_integer(type->id())`, which has one more function that the user needs to 
find. Granted, I overlooked that the proposed implementation could be 
simplified using the type id.

Regarding documentation, when I search for "apache arrow type is integer", the 
top results are [https://arrow.apache.org/docs/r/reference/data-type.html,] 
[https://arrow.apache.org/docs/r/reference/data-type.html,] followed by PyArrow 
results. Adding "C++" to the search doesn't change the results much.

> [C++] Add type category membership checks
> -----------------------------------------
>
>                 Key: ARROW-17289
>                 URL: https://issues.apache.org/jira/browse/ARROW-17289
>             Project: Apache Arrow
>          Issue Type: Improvement
>          Components: C++
>            Reporter: Yaron Gvili
>            Assignee: Yaron Gvili
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Currently, type categories are only available as vectors, e.g., the category 
> of integer types is available via `arrow::IntTypes()`. This issue will add 
> type category membership test, e.g. `arrow::IsIntType(type)`.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to