| 295 | } |
| 296 | |
| 297 | Status TrueUnlessNullExec(KernelContext* ctx, const ExecSpan& batch, ExecResult* out) { |
| 298 | // Set all bits in the output's value bitmap to true |
| 299 | ArraySpan* out_span = out->array_span_mutable(); |
| 300 | bit_util::SetBitsTo(out_span->buffers[1].data, out_span->offset, out_span->length, |
| 301 | true); |
| 302 | |
| 303 | // Set the output's validity bitmap based on the nullity of the input array |
| 304 | // NOTE: alternatively, we could switch this kernel's null handling back to |
| 305 | // NullHandling::INTERSECTION and change the validity checks in exec.cc so that |
| 306 | // they correctly handle logical nulls, but that would invove significant changes |
| 307 | // in exec.cc which might have more side effects |
| 308 | return SetLogicalNullBits(ctx, batch[0].array, out_span->buffers[0].data, |
| 309 | out_span->offset, |
| 310 | /*set_on_null=*/false, /*nan_is_null=*/false); |
| 311 | } |
| 312 | |
| 313 | const FunctionDoc is_valid_doc( |
| 314 | "Return true if non-null", |
nothing calls this directly
no test coverage detected