-
Notifications
You must be signed in to change notification settings - Fork 4k
Description
Describe the bug, including details regarding any error messages, version, and platform.
For now, the validity-buffer for output-data may not be preallocated with NullHandling::INTERSECTION according the input-data's NullGeneration.
arrow/cpp/src/arrow/compute/exec.cc
Lines 943 to 951 in fecd207
| } else if (kernel_->null_handling == NullHandling::INTERSECTION) { | |
| elide_validity_bitmap_ = true; | |
| for (const auto& arg : args) { | |
| auto null_gen = NullGeneralization::Get(arg) == NullGeneralization::ALL_VALID; | |
| // If not all valid, this becomes false | |
| elide_validity_bitmap_ = elide_validity_bitmap_ && null_gen; | |
| } | |
| validity_preallocated_ = !elide_validity_bitmap_; |
We've talked about this in #41975 (comment).
If null_handling is INTERSECTION the function might want to follow a single code path that uses the pre-allocated buffer to put the result of the bitmaps intersection.
If some future implementations of kernel function believe that INTERSECTION mode must pre-allocate a validity-buffer, and rely on this to build their own logic, then the current ScalarExecutor pre-allocation strategy for validity-buffer in INTERSECTION mode may cause potential SIGSEGV problems.
Component(s)
C++