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

Function BoxValueCounts

cpp/src/arrow/compute/kernels/vector_hash.cc:632–638  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

630}
631
632std::shared_ptr<ArrayData> BoxValueCounts(const std::shared_ptr<ArrayData>& uniques,
633 const std::shared_ptr<ArrayData>& counts) {
634 auto data_type =
635 struct_({field(kValuesFieldName, uniques->type), field(kCountsFieldName, int64())});
636 ArrayVector children = {MakeArray(uniques), MakeArray(counts)};
637 return std::make_shared<StructArray>(data_type, uniques->length, children)->data();
638}
639
640Status ValueCountsFinalize(KernelContext* ctx, std::vector<Datum>* out) {
641 auto hash_impl = checked_cast<HashKernel*>(ctx->state());

Callers 2

ValueCountsFinalizeFunction · 0.85

Calls 4

struct_Function · 0.85
MakeArrayFunction · 0.70
fieldFunction · 0.50
dataMethod · 0.45

Tested by

no test coverage detected