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

Function ResolveKernels

cpp/src/arrow/acero/aggregate_internal.cc:136–153  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136Result<FieldVector> ResolveKernels(
137 const std::vector<Aggregate>& aggregates,
138 const std::vector<const HashAggregateKernel*>& kernels,
139 const std::vector<std::unique_ptr<KernelState>>& states, ExecContext* ctx,
140 const std::vector<std::vector<TypeHolder>>& types) {
141 FieldVector fields(types.size());
142
143 for (size_t i = 0; i < kernels.size(); ++i) {
144 KernelContext kernel_ctx{ctx};
145 kernel_ctx.SetState(states[i].get());
146
147 const auto aggr_in_types = ExtendWithGroupIdType(types[i]);
148 ARROW_ASSIGN_OR_RAISE(
149 auto type, kernels[i]->signature->out_type().Resolve(&kernel_ctx, aggr_in_types));
150 fields[i] = field(aggregates[i].function, type.GetSharedPtr());
151 }
152 return fields;
153}
154
155void AggregatesToString(std::stringstream* ss, const Schema& input_schema,
156 const std::vector<Aggregate>& aggs,

Callers

nothing calls this directly

Calls 5

ExtendWithGroupIdTypeFunction · 0.85
ResolveFunction · 0.85
fieldFunction · 0.50
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected