| 156 | void AddNullExec(ScalarFunction* func); |
| 157 | |
| 158 | inline Result<std::shared_ptr<Buffer>> GetOrCopyNullBitmapBuffer( |
| 159 | const ArraySpan& in_array, MemoryPool* pool) { |
| 160 | if (in_array.buffers[0].data == nullptr) { |
| 161 | return nullptr; |
| 162 | } |
| 163 | |
| 164 | if (in_array.offset == 0) { |
| 165 | return in_array.GetBuffer(0); |
| 166 | } |
| 167 | |
| 168 | if (in_array.offset % 8 == 0) { |
| 169 | return SliceBuffer(in_array.GetBuffer(0), /*offset=*/in_array.offset / 8); |
| 170 | } |
| 171 | |
| 172 | // If a non-zero offset, we need to shift the bitmap |
| 173 | return arrow::internal::CopyBitmap(pool, in_array.buffers[0].data, in_array.offset, |
| 174 | in_array.length); |
| 175 | } |
| 176 | |
| 177 | } // namespace internal |
| 178 | } // namespace compute |
no test coverage detected