| 46 | // things simpler |
| 47 | template <typename SrcType, typename DestType> |
| 48 | Status CastListOffsets(KernelContext* ctx, const ArraySpan& in_array, |
| 49 | ArrayData* out_array) { |
| 50 | using src_offset_type = typename SrcType::offset_type; |
| 51 | using dest_offset_type = typename DestType::offset_type; |
| 52 | |
| 53 | if constexpr (!std::is_same<src_offset_type, dest_offset_type>::value) { |
| 54 | ARROW_ASSIGN_OR_RAISE(out_array->buffers[1], ctx->Allocate(sizeof(dest_offset_type) * |
| 55 | (in_array.length + 1))); |
| 56 | ::arrow::internal::CastInts(in_array.GetValues<src_offset_type>(1), |
| 57 | out_array->GetMutableValues<dest_offset_type>(1), |
| 58 | in_array.length + 1); |
| 59 | } |
| 60 | |
| 61 | return Status::OK(); |
| 62 | } |
| 63 | |
| 64 | template <typename SrcType, typename DestType> |
| 65 | struct CastList { |
nothing calls this directly
no test coverage detected