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

Function ExecCopyArrayData

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

Source from the content-addressed store, hash-verified

885// Scalar function execution
886
887Status ExecCopyArrayData(KernelContext*, const ExecSpan& batch, ExecResult* out) {
888 DCHECK_EQ(1, batch.num_values());
889 int value_size = batch[0].type()->byte_width();
890
891 const ArraySpan& arg0 = batch[0].array;
892 ArrayData* out_arr = out->array_data().get();
893 uint8_t* dst = out_arr->buffers[1]->mutable_data() + out_arr->offset * value_size;
894 const uint8_t* src = arg0.buffers[1].data + arg0.offset * value_size;
895 std::memcpy(dst, src, batch.length * value_size);
896 return Status::OK();
897}
898
899Status ExecCopyArraySpan(KernelContext*, const ExecSpan& batch, ExecResult* out) {
900 DCHECK_EQ(1, batch.num_values());

Callers 1

ExecNoPreallocatedDataFunction · 0.85

Calls 7

array_dataMethod · 0.80
OKFunction · 0.50
num_valuesMethod · 0.45
byte_widthMethod · 0.45
typeMethod · 0.45
getMethod · 0.45
mutable_dataMethod · 0.45

Tested by

no test coverage detected