MCPcopy Create free account
hub / github.com/bytedance/bolt / makeRowContainer

Method makeRowContainer

bolt/exec/StreamingAggregation.cpp:358–388  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

356}
357
358std::unique_ptr<RowContainer> StreamingAggregation::makeRowContainer(
359 const std::vector<TypePtr>& groupingKeyTypes) {
360 std::vector<Accumulator> accumulators;
361 accumulators.reserve(aggregates_.size());
362 for (const auto& aggregate : aggregates_) {
363 accumulators.emplace_back(
364 aggregate.function.get(), aggregate.intermediateType);
365 }
366
367 if (sortedAggregations_ != nullptr) {
368 accumulators.push_back(sortedAggregations_->accumulator());
369 }
370
371 for (const auto& aggregation : distinctAggregations_) {
372 if (aggregation != nullptr) {
373 accumulators.push_back(aggregation->accumulator());
374 }
375 }
376
377 return std::make_unique<RowContainer>(
378 groupingKeyTypes,
379 !aggregationNode_->ignoreNullKeys(),
380 accumulators,
381 std::vector<TypePtr>{},
382 false,
383 false,
384 false,
385 false,
386 false /*useListRowIndex*/,
387 pool());
388}
389
390void StreamingAggregation::initializeNewGroups(size_t numPrevGroups) {
391 if (numGroups_ == numPrevGroups) {

Callers

nothing calls this directly

Calls 7

ignoreNullKeysMethod · 0.80
poolFunction · 0.50
reserveMethod · 0.45
sizeMethod · 0.45
getMethod · 0.45
push_backMethod · 0.45
accumulatorMethod · 0.45

Tested by

no test coverage detected