Commits


Andrew Wieteska authored and Antoine Pitrou committed cb04686185b
ARROW-1846: [C++][Compute] Implement "any" reduction kernel for boolean data As discussed on Jira this is a short-circuiting Max for booleans implemented on top of the existing `min_max` kernel. As is there are no options: null is always taken to evaluate to false. If we want to include control over null handling I can either add `Options` to the kernel or I can implement an `any_kleene` kernel by analogy with the `and_kleene` and `or_kleene` logical kernels that we have. In Python the two options would look like: ``` python In []: a = pa.array([True, None], type='bool') ...: ...: # option 1 ...: pc.any(a).as_py() is True ...: pc.any_kleene(a).as_py() is None ...: ...: # option 2 ...: pc.any(null_handling='skip') is True ...: pc.any(null_handling='emit_null') is None ``` Closes #8294 from arw2019/ARROW-1846 Lead-authored-by: Andrew Wieteska <andrew.r.wieteska@gmail.com> Co-authored-by: arw2019 <andrew.r.wieteska@gmail.com> Co-authored-by: Andrew Wieteska <48889395+arw2019@users.noreply.github.com> Signed-off-by: Antoine Pitrou <antoine@python.org>