You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Eduardo Ponce (Jira)" <ji...@apache.org> on 2022/01/10 11:07:00 UTC

[jira] [Comment Edited] (ARROW-15223) [C++] Implement Not Between ternary kernel

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

Eduardo Ponce edited comment on ARROW-15223 at 1/10/22, 11:06 AM:
------------------------------------------------------------------

[~jorisvandenbossche] There are differences when comparing the approach for the logical compare functions:
 * The binary and ternary logical comparisons are functionally different. In binary comparisons, the complement operation can be performed by [exchanging/flipping|https://github.com/apache/arrow/blob/master/cpp/src/arrow/compute/kernels/scalar_compare.cc#L314] the operands. This is not the case for ternary kernels (and {{{}equal/not_equal{}}}).
 * Since {{equal/not_equal}} are trivial, specializing them is faster than having one kernel invoke the other one.

The {{not_between}} would be implemented as a kernel that simply negates the result from {{between}} because there is some complexity. There are kernel specializations based on {{{}BetweenOptions{}}}, so duplicating them is not appealing for a probably negligible performance gain. [The {{not_between}} kernel would be implemented something like this|https://github.com/bkmgit/arrow/pull/8#issuecomment-1003458024].


was (Author: edponce):
[~jorisvandenbossche] There are differences when comparing the approach for the logical compare functions:
* The binary and ternary logical comparisons are functionally different. In binary comparisons, the complement operation can be performed by exchanging/flipping the operands. This is not the case for ternary kernels (and {{equal/not_equal}}).
* Since {{equal/not_equal}} are trivial, specializing them is faster than having one kernel invoke the other one.

The {{not_between}} would be implemented as a kernel that simply negates the result from {{between}} because there is some complexity. There are kernel specializations based on {{BetweenOptions}}, so duplicating them is not appealing for a probably negligible performance gain. [The {{not_between}} kernel would be implemented something like this|https://github.com/bkmgit/arrow/pull/8#issuecomment-1003458024].

> [C++] Implement Not Between ternary kernel
> ------------------------------------------
>
>                 Key: ARROW-15223
>                 URL: https://issues.apache.org/jira/browse/ARROW-15223
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++
>            Reporter: Eduardo Ponce
>            Priority: Major
>              Labels: good-first-issue
>             Fix For: 8.0.0
>
>
> Add a specialized {{not_between(arr, left_bound, right_bound)}} kernel analogous to {{between()}} in ARROW-9843.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)