[ https://issues.apache.org/jira/browse/ARROW-9843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17424235#comment-17424235 ]
Kouhei Sutou commented on ARROW-9843: ------------------------------------- Yes. We should support all boundaries: {{left < X < right}}, {{left <= X right}}, {{left < X <= right}} and {{left <= X <= right}} The default should be {{left <= X <= right}} like pandas and SQL's {{BETWEEN}}. We can use {{FunctionOptions}} https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/function.h#L60 feature for it. For example, {{min_element_wise}} uses the {{FunctionOptions}} feature: https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_compare.cc > [C++] Implement Between trinary kernel > -------------------------------------- > > Key: ARROW-9843 > URL: https://issues.apache.org/jira/browse/ARROW-9843 > Project: Apache Arrow > Issue Type: New Feature > Components: C++ > Reporter: Wes McKinney > Assignee: Benson Muite > Priority: Major > Labels: pull-request-available > Time Spent: 10m > Remaining Estimate: 0h > > A specialized {{between(arr, left_bound, right_bound)}} kernel would avoid > multiple scans and AND operation -- This message was sent by Atlassian Jira (v8.3.4#803005)