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

Method deserialize

bolt/exec/tests/ContainerRowSerdeTest.cpp:90–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

88 }
89
90 VectorPtr deserialize(
91 HashStringAllocator::Position position,
92 const TypePtr& type,
93 vector_size_t numRows) {
94 auto data = BaseVector::create(type, numRows, pool());
95 // Set all rows in data to NULL to verify that deserialize can clear nulls
96 // correctly.
97 for (auto i = 0; i < numRows; ++i) {
98 data->setNull(i, true);
99 }
100
101 auto in = HashStringAllocator::prepareRead(position.header);
102 for (auto i = 0; i < numRows; ++i) {
103 ContainerRowSerde::deserialize(*in, i, data.get());
104 }
105 return data;
106 }
107
108 void testRoundTrip(const VectorPtr& data) {
109 auto position = serialize(data);

Callers

nothing calls this directly

Calls 6

prepareReadFunction · 0.85
createFunction · 0.50
poolFunction · 0.50
deserializeFunction · 0.50
setNullMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected