| 362 | } |
| 363 | |
| 364 | Result<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 | |
| 377 | static void BenchmarkAggregate( |
| 378 | benchmark::State& state, std::vector<Aggregate> aggregates, |
no test coverage detected