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

Function BatchGroupBy

cpp/src/arrow/acero/aggregate_benchmark.cc:364–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

362}
363
364Result<std::shared_ptr<Table>> BatchGroupBy(
365 std::shared_ptr<RecordBatch> batch, std::vector<Aggregate> aggregates,
366 std::vector<FieldRef> keys, std::vector<FieldRef> segment_keys,
367 bool use_threads = false, MemoryPool* memory_pool = default_memory_pool()) {
368 ARROW_ASSIGN_OR_RAISE(std::shared_ptr<Table> table,
369 Table::FromRecordBatches({std::move(batch)}));
370 Declaration plan = Declaration::Sequence(
371 {{"table_source", TableSourceNodeOptions(std::move(table))},
372 {"aggregate", AggregateNodeOptions(std::move(aggregates), std::move(keys),
373 std::move(segment_keys))}});
374 return DeclarationToTable(std::move(plan), use_threads, memory_pool);
375}
376
377static void BenchmarkAggregate(
378 benchmark::State& state, std::vector<Aggregate> aggregates,

Callers 1

BenchmarkAggregateFunction · 0.85

Calls 5

default_memory_poolFunction · 0.85
TableSourceNodeOptionsFunction · 0.85
DeclarationToTableFunction · 0.85
ARROW_ASSIGN_OR_RAISEFunction · 0.70

Tested by

no test coverage detected