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

Method outputUniqueGroupsInRowFormat

bolt/exec/GroupingSet.cpp:1404–1434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1402 ? accumulators[i].extractForSpill(
1403 folly::Range<char**>(uniqueRows.data(), uniqueRows.size()),
1404 args)
1405 : accumulators[i].extractForOutput(
1406 folly::Range<char**>(uniqueRows.data(), uniqueRows.size()),
1407 args);
1408 aggCol->copy(args->wrappedVector(), uniqueCount, 0, args->size());
1409 BOLT_CHECK_EQ(uniqueCount + args->size(), aggCol->size());
1410 }
1411 uniqueCount += uniqueRows.size();
1412 uniqueRows.clear();
1413 estimateUniqueBytesPerRow = std::max(
1414 estimateUniqueBytesPerRow,
1415 (size_t)(uniqueRes->inMemoryBytes() * 1.0 / uniqueRes->size()));
1416 }
1417}
1418
1419void GroupingSet::outputUniqueGroupsInRowFormat(
1420 std::vector<char*>& uniqueRows,
1421 const RowVectorPtr& result,
1422 const int32_t resultOffset,
1423 size_t& estimateUniqueBytesPerRow,
1424 const std::vector<int32_t>& rowSizeVec,
1425 const uint64_t totalUniqueRowSize) {
1426 if (!uniqueRows.empty()) {
1427 auto* container = spiller_->container();
1428 const CompositeRowVectorPtr& compositeResult =
1429 std::dynamic_pointer_cast<CompositeRowVector>(result);
1430 NanosecondTimer aggTimer(&stats_.aggOutputUpdateTimeNs);
1431 // extract keys in RowVector format
1432 for (auto i = 0; i < keyChannels_.size(); ++i) {
1433 rowToColumnVector(
1434 uniqueRows.data(),
1435 uniqueRows.size(),
1436 container->columns().at(i),
1437 resultOffset,

Callers

nothing calls this directly

Calls 8

rowToColumnVectorFunction · 0.85
childAtMethod · 0.80
emptyMethod · 0.45
containerMethod · 0.45
sizeMethod · 0.45
dataMethod · 0.45
atMethod · 0.45
estimateRowSizeMethod · 0.45

Tested by

no test coverage detected