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

Method Init

cpp/src/arrow/compute/kernels/hash_aggregate.cc:744–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

742 typename std::conditional<is_boolean_type<Type>::value, uint8_t, CType>::type;
743
744 Status Init(ExecContext* ctx, const KernelInitArgs& args) override {
745 options_ = *checked_cast<const ScalarAggregateOptions*>(args.options);
746
747 // First and last non-null values
748 firsts_ = TypedBufferBuilder<CType>(ctx->memory_pool());
749 lasts_ = TypedBufferBuilder<CType>(ctx->memory_pool());
750
751 // Whether the first/last element is null
752 first_is_nulls_ = TypedBufferBuilder<bool>(ctx->memory_pool());
753 last_is_nulls_ = TypedBufferBuilder<bool>(ctx->memory_pool());
754
755 has_values_ = TypedBufferBuilder<bool>(ctx->memory_pool());
756 has_any_values_ = TypedBufferBuilder<bool>(ctx->memory_pool());
757 return Status::OK();
758 }
759
760 Status Resize(int64_t new_num_groups) override {
761 auto added_groups = new_num_groups - num_groups_;

Callers

nothing calls this directly

Calls 2

OKFunction · 0.50
memory_poolMethod · 0.45

Tested by

no test coverage detected