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

Function MakeOutputSchema

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

Source from the content-addressed store, hash-verified

207}
208
209Result<std::shared_ptr<Schema>> MakeOutputSchema(
210 const std::shared_ptr<Schema>& input_schema, const std::vector<FieldRef>& keys,
211 const std::vector<FieldRef>& segment_keys, const std::vector<Aggregate>& aggregates,
212 ExecContext* exec_ctx) {
213 if (keys.empty()) {
214 ARROW_ASSIGN_OR_RAISE(auto args,
215 ScalarAggregateNode::MakeAggregateNodeArgs(
216 input_schema, keys, segment_keys, aggregates, exec_ctx,
217 /*concurrency=*/1, /*is_cpu_parallel=*/false));
218 return std::move(args.output_schema);
219 } else {
220 ARROW_ASSIGN_OR_RAISE(auto args, GroupByNode::MakeAggregateNodeArgs(
221 input_schema, keys, segment_keys, aggregates,
222 exec_ctx, /*is_cpu_parallel=*/false));
223 return std::move(args.output_schema);
224 }
225}
226
227Result<std::vector<Datum>> ExtractValues(const ExecBatch& input_batch,
228 const std::vector<int>& field_ids) {

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.45

Tested by

no test coverage detected