MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / serialize

Method serialize

src/Storages/MergeTree/MergeTreeIndexText.cpp:138–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138void PostingsSerialization::serialize(const roaring::api::roaring_bitmap_t & postings, UInt64 header, WriteBuffer & ostr)
139{
140 if (header & RawPostings)
141 {
142 roaring::api::roaring_uint32_iterator_t it;
143 roaring_iterator_init(&postings, &it);
144
145 while (it.has_value)
146 {
147 writeVarUInt(it.current_value, ostr);
148 roaring::api::roaring_uint32_iterator_advance(&it);
149 }
150 }
151 else
152 {
153 size_t num_bytes = roaring::api::roaring_bitmap_portable_size_in_bytes(&postings);
154 writeVarUInt(num_bytes, ostr);
155
156 std::vector<char> memory(num_bytes);
157 roaring::api::roaring_bitmap_portable_serialize(&postings, memory.data());
158 ostr.write(memory.data(), num_bytes);
159 }
160}
161
162void PostingsSerialization::serialize(const PostingList & postings, TokenPostingsInfo & info, size_t posting_list_block_size, WriteBuffer & ostr)
163{

Callers 2

serializePostingsMethod · 0.45

Calls 8

writeVarUIntFunction · 0.85
serializeFunction · 0.85
dataMethod · 0.45
writeMethod · 0.45
getTypeMethod · 0.45
encodeMethod · 0.45
isLargeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected