| 885 | // Scalar function execution |
| 886 | |
| 887 | Status 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 | |
| 899 | Status ExecCopyArraySpan(KernelContext*, const ExecSpan& batch, ExecResult* out) { |
| 900 | DCHECK_EQ(1, batch.num_values()); |
no test coverage detected