| 725 | } |
| 726 | |
| 727 | static Status ExecChunk(KernelContext* ctx, const ArraySpan& array, ExecResult* out, |
| 728 | const ArraySpan& last_valid_value_chunk, |
| 729 | int64_t* last_valid_value_offset) { |
| 730 | ArrayData* out_arr = out->array_data().get(); |
| 731 | out_arr->length = array.length; |
| 732 | int8_t direction = -1; |
| 733 | |
| 734 | if (array.MayHaveNulls()) { |
| 735 | ARROW_ASSIGN_OR_RAISE( |
| 736 | auto reversed_bitmap, |
| 737 | arrow::internal::ReverseBitmap(ctx->memory_pool(), array.buffers[0].data, |
| 738 | array.offset, array.length)); |
| 739 | return FillNullImpl<Type>::Exec(ctx, array, reversed_bitmap->data(), out, direction, |
| 740 | last_valid_value_chunk, last_valid_value_offset); |
| 741 | } else { |
| 742 | // Zero copy optimization |
| 743 | if (array.length > 0) { |
| 744 | *last_valid_value_offset = 0; |
| 745 | } |
| 746 | out->value = array.ToArrayData(); |
| 747 | } |
| 748 | return Status::OK(); |
| 749 | } |
| 750 | |
| 751 | static std::shared_ptr<KernelSignature> GetSignature(detail::GetTypeId get_id) { |
| 752 | return KernelSignature::Make({InputType(get_id.id)}, FirstType); |
nothing calls this directly
no test coverage detected