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

Method Exec

cpp/src/arrow/compute/kernels/vector_run_end_encode.cc:464–491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

462
463 public:
464 Status Exec() {
465 const auto* ree_type = checked_cast<const RunEndEncodedType*>(input_array_.type);
466 const int64_t length = input_array_.length;
467 int64_t data_buffer_size = 0;
468 if constexpr (is_base_binary_like(ValueType::type_id)) {
469 if (length > 0) {
470 RunEndDecodingLoop<RunEndType, ValueType, has_validity_buffer> loop(input_array_,
471 NULLPTR);
472 data_buffer_size = loop.CalculateOutputDataBufferSize();
473 }
474 }
475
476 ARROW_ASSIGN_OR_RAISE(
477 auto output_array_data,
478 ree_util::PreallocateValuesArray(ree_type->value_type(), has_validity_buffer,
479 length, ctx_->memory_pool(), data_buffer_size));
480
481 int64_t output_null_count = 0;
482 if (length > 0) {
483 RunEndDecodingLoop<RunEndType, ValueType, has_validity_buffer> loop(
484 input_array_, output_array_data.get());
485 output_null_count = length - loop.ExpandAllRuns();
486 }
487 output_array_data->null_count = output_null_count;
488
489 output_->value = std::move(output_array_data);
490 return Status::OK();
491 }
492};
493
494Status RunEndDecodeNullREEArray(KernelContext* ctx, const ArraySpan& input_array,

Callers

nothing calls this directly

Calls 5

is_base_binary_likeFunction · 0.85
ExpandAllRunsMethod · 0.80
OKFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected