-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-10301: [C++][Compute] Implement "all" reduction kernel for boolean data #8474
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
Conversation
|
@arw2019 it looks like quite a few CI failures? Is this still WIP? |
Failures crept in at the recent rebase (was all green before). Marking as draft while I debug & will comment when ready for review |
|
Ready for re-review. CI all green |
e365c34 to
0020eb2
Compare
jorisvandenbossche
left a comment
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.
Looks good to me (although not a C++ kernel expert ;)), but the docs / tests looks good.
Since this is similar to #8294, and most review on the code happened there, does it makes sense to get that PR merged first?
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.
Just wondering but should it in theory not be a "AndNot" instead of "OrNot" ?
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.
I named it after the bit operation we're using, which in this case is
arrow/cpp/src/arrow/util/bit_block_counter.h
Lines 196 to 197 in 7efb373
| /// \brief Computes "x | ~y" block for each available run of bits. | |
| BitBlockCount NextOrNotWord(); |
|
@arw2019 Do you want to revisit this now that the "any" kernel has been merged? |
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.
I'm duplicating code here. NextOrBlock is identical to
arrow/cpp/src/arrow/util/bit_block_counter.h
Lines 223 to 231 in bd10727
| BitBlockCount NextAndBlock() { | |
| static constexpr int64_t kMaxBlockSize = std::numeric_limits<int16_t>::max(); | |
| switch (has_bitmap_) { | |
| case HasBitmap::BOTH: { | |
| BitBlockCount block = binary_counter_.NextAndWord(); | |
| position_ += block.length; | |
| return block; | |
| } | |
| case HasBitmap::ONE: { |
except for
case HasBitmap::BOTH: where NextOrNotWord is called. Is there a good way to avoid the repetition?
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.
I think it's ok for now, we can revisit later if desired.
|
@pitrou rebased + green so ready for re-review. xref #8474 (comment) is a question about |
Codecov Report
@@ Coverage Diff @@
## master #8474 +/- ##
==========================================
- Coverage 84.40% 84.18% -0.22%
==========================================
Files 186 186
Lines 45241 45445 +204
==========================================
+ Hits 38184 38260 +76
- Misses 7057 7185 +128
Continue to review full report at Codecov.
|
pitrou
left a comment
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.
+1. Rebased, will merge.
|
Thanks @pitrou @jorisvandenbossche for reviewing!!! |
No description provided.