arw2019 opened a new pull request #8294:
URL: https://github.com/apache/arrow/pull/8294
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
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]