[
https://issues.apache.org/jira/browse/ARROW-14332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17465527#comment-17465527
]
Eduardo Ponce edited comment on ARROW-14332 at 12/27/21, 6:09 AM:
------------------------------------------------------------------
The inconsistency/non-symmetry between the *is_xxx_type* type traits and
*is_xxx* functions arises due to how derived and specific-types are considered.
This clearly shows in the {{is_xxx_like}} variants. Also, it is a bit difficult
to express specific types versus derived classes using only the *is* predicate.
was (Author: edponce):
The inconsistency/non-symmetry between the *is_xxx_type* type traits and
*is_xxx* functions arises due to how derived and specific-types are considered,
specifically in the {{is_xxx_like}} variants.
> [C++] Rename type traits utilities to improve semantic consistency
> ------------------------------------------------------------------
>
> Key: ARROW-14332
> URL: https://issues.apache.org/jira/browse/ARROW-14332
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Eduardo Ponce
> Assignee: Eduardo Ponce
> Priority: Minor
> Labels: type
> Fix For: 8.0.0
>
>
> There are semantic differences between *enable_ifs-related* utils and
> *is_xxx* functions with the same name. For example, *is_binary_like*
> [here|https://github.com/apache/arrow/blob/master/cpp/src/arrow/type_traits.h#L596]
> !=
> [here|https://github.com/apache/arrow/blob/master/cpp/src/arrow/type_traits.h#L924].
> The former includes binary only and the latter binary/string types.
> Also, the *_like* suffix seems unwarranted as they always refer to binary or
> string.
> Also, the *is_fixed_size_binary* includes both _FixedSizeBinaryType_ and
> {_}DecimalXXXType{_}. A better name is *is_base_fixed_size_binary* to match
> how binary/string utils are used.
> {_}Note{_}: There might be other inconsistencies.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)