bkietz commented on a change in pull request #8728:
URL: https://github.com/apache/arrow/pull/8728#discussion_r528767690
##########
File path: cpp/src/arrow/compute/exec.cc
##########
@@ -213,20 +214,33 @@ bool ExecBatchIterator::Next(ExecBatch* batch) {
namespace {
-bool ArrayHasNulls(const ArrayData& data) {
- // As discovered in ARROW-8863 (and not only for that reason)
- // ArrayData::null_count can -1 even when buffers[0] is nullptr. So we check
- // for both cases (nullptr means no nulls, or null_count already computed)
- if (data.type->id() == Type::NA) {
- return true;
- } else if (data.buffers[0] == nullptr) {
- return false;
- } else {
+struct NullGeneralization {
+ enum type { NONE, ALL_VALID, ALL_NULL };
Review comment:
Alright
----------------------------------------------------------------
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]