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

Function wrapColumns

bolt/exec/OperatorUtils.cpp:595–613  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

593}
594
595RowVectorPtr wrapColumns(
596 const RowVector* input,
597 const std::vector<column_index_t>& channels,
598 const RowTypePtr& types,
599 memory::MemoryPool* pool) {
600 BOLT_CHECK_NOT_NULL(input);
601
602 std::vector<VectorPtr> children;
603 children.reserve(channels.size());
604 for (auto& channel : channels)
605 children.push_back(input->childAt(channel));
606
607 // Preserve row-level nulls if present on the input RowVector; otherwise
608 // nullptr.
609 BufferPtr rowNulls = input->nulls();
610
611 return std::make_shared<RowVector>(
612 pool, types, rowNulls, input->size(), children);
613}
614
615} // namespace bytedance::bolt::exec

Callers 2

addInputMethod · 0.85
addInputMethod · 0.85

Calls 5

childAtMethod · 0.80
reserveMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
nullsMethod · 0.45

Tested by

no test coverage detected