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

Method ExecChunk

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

Source from the content-addressed store, hash-verified

647 }
648
649 static Status ExecChunk(KernelContext* ctx, const ArraySpan& array, ExecResult* out,
650 const ArraySpan& last_valid_value_chunk,
651 int64_t* last_valid_value_offset) {
652 ArrayData* output = out->array_data().get();
653 output->length = array.length;
654 int8_t direction = 1;
655 if (array.MayHaveNulls()) {
656 ARROW_ASSIGN_OR_RAISE(
657 auto null_bitmap,
658 arrow::internal::CopyBitmap(ctx->memory_pool(), array.buffers[0].data,
659 array.offset, array.length));
660 return FillNullImpl<Type>::Exec(ctx, array, null_bitmap->data(), out, direction,
661 last_valid_value_chunk, last_valid_value_offset);
662 } else {
663 // TODO(wesm): zero copy optimization is a bit ugly...
664 if (array.length > 0) {
665 *last_valid_value_offset = array.length - 1;
666 }
667 out->value = array.ToArrayData();
668 }
669 return Status::OK();
670 }
671
672 static std::shared_ptr<KernelSignature> GetSignature(detail::GetTypeId get_id) {
673 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