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

Method updateRows

bolt/exec/GroupingSet.cpp:1998–2021  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1996 const RowVectorPtr& result,
1997 const std::vector<std::pair<int32_t, int32_t>>& ranges) {
1998 auto numRows = mergeRows_->numRows();
1999 if (numRows == 0) {
2000 return;
2001 }
2002 std::vector<char*> rows(numRows);
2003 RowContainerIterator iter;
2004 uint64_t totalRowSize = 0;
2005 mergeRows_->listRows(
2006 &iter, rows.size(), RowContainer::kUnlimited, rows.data());
2007 // RowContainer to serialized row format
2008 extractSpilledGroupsInRowFormat(
2009 folly::Range<char**>(rows.data(), numRows), result, ranges);
2010 mergeRows_->clear();
2011}
2012
2013void GroupingSet::updateRows(
2014 const RowVectorPtr& input,
2015 std::vector<char*>& rows) {
2016 BOLT_CHECK_EQ(input->size(), rows.size());
2017 mergeSelection_.resizeFill(input->size());
2018 for (auto i = 0; i < aggregates_.size(); ++i) {
2019 if (!aggregates_[i].sortingKeys.empty()) {
2020 continue;
2021 }
2022 auto intermediate =
2023 std::vector<VectorPtr>({input->childAt(i + keyChannels_.size())});
2024 aggregates_[i].function->addIntermediateResults(

Callers

nothing calls this directly

Calls 7

resizeFillMethod · 0.80
childAtMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected