New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ARROW-4038: [Rust] Implement boolean AND, OR, NOT array ops #3189
Conversation
@paddyhoran @sunchao Could I get a review please. Rust tests are passing but Python tests failed with a timeout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @andygrove . It seems there is no well-established rules to define what's the result should be when one of the operand is null. Maybe we should add document for each public methods and clearly describe the behavior. This can be in a different PR of course.
Another minor thing is, in operators such as gt_eq
, we define:
bool_op(left, right, |a, b| match (a, b) {
(None, _) => false,
(_, None) => true,
(Some(aa), Some(bb)) => aa >= bb,
})
However this means None
and None
is also mapped to false
, is that right? This perhaps is unexpected.
Codecov Report
@@ Coverage Diff @@
## master #3189 +/- ##
==========================================
+ Coverage 86.41% 87.56% +1.14%
==========================================
Files 504 450 -54
Lines 69587 66065 -3522
==========================================
- Hits 60137 57853 -2284
+ Misses 9353 8212 -1141
+ Partials 97 0 -97
Continue to review full report at Codecov.
|
Thanks @sunchao I addressed your feedback. Good points. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks @andygrove .
- Implements boolean AND, OR, NOT operations in `array_ops` - Removes all uses of `unwrap()` in array_ops and replaces with `?` - Improve error messages Author: Andy Grove <andygrove73@gmail.com> Closes apache#3189 from andygrove/ARROW-4038 and squashes the following commits: 69518d7 <Andy Grove> add tests a38d9a9 <Andy Grove> add docs for all array_ops and add explicit handling for case where both sides are null 661e2af <Andy Grove> improve error message 36b9171 <Andy Grove> Implement boolean AND, OR, NOT operations, remove unwraps and improve error message
array_ops
unwrap()
in array_ops and replaces with?