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

Method asArray

bolt/vector/tests/utils/VectorTestBase.h:187–201  ·  view source on GitHub ↗

Returns a one element ArrayVector with 'vector' as elements of array at 0.

Source from the content-addressed store, hash-verified

185
186 // Returns a one element ArrayVector with 'vector' as elements of array at 0.
187 VectorPtr asArray(VectorPtr vector) {
188 BufferPtr sizes = AlignedBuffer::allocate<vector_size_t>(
189 1, vector->pool(), vector->size());
190 BufferPtr offsets =
191 AlignedBuffer::allocate<vector_size_t>(1, vector->pool(), 0);
192 return std::make_shared<ArrayVector>(
193 vector->pool(),
194 ARRAY(vector->type()),
195 BufferPtr(nullptr),
196 1,
197 offsets,
198 sizes,
199 vector,
200 0);
201 }
202
203 /// Splits input vector into 'n' vectors evenly. Input vector must have at
204 /// least 'n' rows.

Callers 15

setTypeMethod · 0.80
exportArrayToArrowSchemaFunction · 0.80
fuzzFlatMethod · 0.80
fuzzComplexMethod · 0.80
UnnestNodeMethod · 0.80
GeneratorNodeMethod · 0.80
writeTypeMethod · 0.80
getParquetColumnInfoMethod · 0.80
convertTypeMethod · 0.80
updateFieldNameRecursiveFunction · 0.80
ARRAY>Method · 0.80
ARRAY>Method · 0.80

Calls 4

ARRAYFunction · 0.85
poolMethod · 0.45
sizeMethod · 0.45
typeMethod · 0.45

Tested by

no test coverage detected