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

Function fillRowVectorChildren

bolt/dwio/common/SelectiveStructColumnReader.cpp:277–290  ·  view source on GitHub ↗

Recursively makes empty RowVectors for positions in 'children' where the corresponding child type in 'rowType' is a row. The reader expects RowVector outputs to be initialized so that the content corresponds to the query schema regardless of the file schema. An empty RowVector can have nullptr for all its non-row children.

Source from the content-addressed store, hash-verified

275// content corresponds to the query schema regardless of the file
276// schema. An empty RowVector can have nullptr for all its non-row
277// children.
278void fillRowVectorChildren(
279 memory::MemoryPool& pool,
280 const RowType& rowType,
281 std::vector<VectorPtr>& children) {
282 for (auto i = 0; i < children.size(); ++i) {
283 const auto& type = rowType.childAt(i);
284 if (type->isRow()) {
285 std::vector<VectorPtr> innerChildren(type->size());
286 fillRowVectorChildren(pool, type->asRow(), innerChildren);
287 children[i] = std::make_shared<RowVector>(
288 &pool, type, nullptr, 0, std::move(innerChildren));
289 }
290 }
291}
292
293VectorPtr tryReuseResult(const VectorPtr& result) {

Callers 1

getValuesMethod · 0.85

Calls 2

childAtMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected