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

Method ExecChunk

cpp/src/arrow/compute/kernels/vector_replace.cc:727–749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);

Callers

nothing calls this directly

Calls 5

array_dataMethod · 0.80
ToArrayDataMethod · 0.80
OKFunction · 0.50
getMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected