MCPcopy Create free account
hub / github.com/apache/arrow / ExecNoPreallocatedAnything

Function ExecNoPreallocatedAnything

cpp/src/arrow/compute/exec_test.cc:937–950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

935}
936
937Status 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
952class ExampleOptions : public FunctionOptions {
953 public:

Callers

nothing calls this directly

Calls 7

ExecNoPreallocatedDataFunction · 0.85
array_dataMethod · 0.80
AllocateBitmapMethod · 0.80
CopyBitmapFunction · 0.50
getMethod · 0.45
ValueMethod · 0.45
mutable_dataMethod · 0.45

Tested by

no test coverage detected