| 935 | } |
| 936 | |
| 937 | Status ExecNoPreallocatedAnything(KernelContext* ctx, const ExecSpan& batch, |
| 938 | ExecResult* out) { |
| 939 | // Neither validity nor data preallocated |
| 940 | ArrayData* out_arr = out->array_data().get(); |
| 941 | DCHECK_EQ(0, out_arr->offset); |
| 942 | Status s = (ctx->AllocateBitmap(out_arr->length).Value(&out_arr->buffers[0])); |
| 943 | DCHECK_OK(s); |
| 944 | const ArraySpan& arg0 = batch[0].array; |
| 945 | CopyBitmap(arg0.buffers[0].data, arg0.offset, batch.length, |
| 946 | out_arr->buffers[0]->mutable_data(), /*offset=*/0); |
| 947 | |
| 948 | // Reuse the kernel that allocates the data |
| 949 | return ExecNoPreallocatedData(ctx, batch, out); |
| 950 | } |
| 951 | |
| 952 | class ExampleOptions : public FunctionOptions { |
| 953 | public: |
nothing calls this directly
no test coverage detected