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

Function addSequence

bolt/vector/BaseVector.cpp:169–189  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167
168template <TypeKind kind>
169static VectorPtr
170addSequence(BufferPtr lengths, vector_size_t size, VectorPtr vector) {
171 auto base = vector.get();
172 auto pool = base->pool();
173 auto lsize = lengths->size();
174 return std::make_shared<
175 SequenceVector<typename KindToFlatVector<kind>::WrapperType>>(
176 pool,
177 size,
178 std::move(vector),
179 std::move(lengths),
180 SimpleVectorStats<typename KindToFlatVector<kind>::WrapperType>{},
181 std::nullopt /*distinctCount*/,
182 std::nullopt,
183 false /*sorted*/,
184 base->representedBytes().has_value()
185 ? std::optional<ByteCount>(
186 base->representedBytes().value() * size /
187 (1 + (lsize / sizeof(vector_size_t))))
188 : std::nullopt);
189}
190
191// static
192VectorPtr BaseVector::wrapInSequence(

Callers

nothing calls this directly

Calls 5

has_valueMethod · 0.80
getMethod · 0.45
poolMethod · 0.45
sizeMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected