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

Function initializeAggregates

bolt/exec/GroupingSet.cpp:355–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353
354namespace {
355
356void initializeAggregates(
357 const std::vector<AggregateInfo>& aggregates,
358 RowContainer& rows,
359 bool excludeToIntermediate) {
360 const auto numKeys = rows.keyTypes().size();
361 int i = 0;
362 for (auto& aggregate : aggregates) {
363 auto& function = aggregate.function;
364 if (excludeToIntermediate && function->supportsToIntermediate()) {
365 continue;
366 }
367 function->setAllocator(&rows.stringAllocator());
368
369 const auto rowColumn = rows.columnAt(numKeys + i);
370 function->setOffsets(
371 rowColumn.offset(),
372 rowColumn.nullByte(),
373 rowColumn.nullMask(),
374 rows.rowSizeOffset());
375 ++i;
376 }
377}
378} // namespace
379

Callers 5

createHashTableMethod · 0.85
getOutputWithSpillMethod · 0.85
convertCompositeInputMethod · 0.85
initializeMethod · 0.85

Calls 10

columnAtMethod · 0.80
rowSizeOffsetMethod · 0.80
sizeMethod · 0.45
setAllocatorMethod · 0.45
stringAllocatorMethod · 0.45
setOffsetsMethod · 0.45
offsetMethod · 0.45
nullByteMethod · 0.45
nullMaskMethod · 0.45

Tested by

no test coverage detected