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

Function BoxValueCounts

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

Source from the content-addressed store, hash-verified

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