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

Method accumulators

bolt/exec/GroupingSet.cpp:379–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

377} // namespace
378
379std::vector<Accumulator> GroupingSet::accumulators(bool excludeToIntermediate) {
380 std::vector<Accumulator> accumulators;
381 accumulators.reserve(aggregates_.size());
382 for (auto& aggregate : aggregates_) {
383 if (!excludeToIntermediate ||
384 !aggregate.function->supportsToIntermediate()) {
385 accumulators.push_back(
386 Accumulator{aggregate.function.get(), aggregate.intermediateType});
387 }
388 }
389
390 if (sortedAggregations_ != nullptr) {
391 accumulators.push_back(sortedAggregations_->accumulator());
392 }
393
394 for (const auto& aggregation : distinctAggregations_) {
395 if (aggregation != nullptr) {
396 accumulators.push_back(aggregation->accumulator());
397 }
398 }
399 return accumulators;
400}
401
402void GroupingSet::createHashTable() {
403 bool jitRowEqVectors = queryConfig_.enableJitRowEqVectors();

Callers 6

spillModeMethod · 0.80
extractSpillMethod · 0.80
makeSpillTypeMethod · 0.80
outputUniqueGroupsMethod · 0.80
RowFormatInfoMethod · 0.80

Calls 6

reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
getMethod · 0.45
accumulatorMethod · 0.45

Tested by

no test coverage detected