MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / appendValidityBulk

Method appendValidityBulk

pj_datastore/src/column_buffer.cpp:282–304  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

280}
281
282void TypedColumnBuffer::appendValidityBulk(BitSpan validity) {
283 const std::size_t count = validity.bit_length;
284 if (count == 0) {
285 return;
286 }
287 ensureValidityInitialized();
288
289 // The validity bitmap covers the last `count` rows that were just appended.
290 // row_count_ already includes them, so the range is
291 // [row_count_ - count, row_count_).
292 const std::size_t start_row = row_count_ - count;
293 validity_.ensureSize(row_count_);
294
295 for (std::size_t i = 0; i < count; ++i) {
296 const bool valid = validity.test(i);
297 if (valid) {
298 validity_.setValid(start_row + i);
299 } else {
300 validity_.setNull(start_row + i);
301 ++null_count_;
302 }
303 }
304}
305
306// ---------------------------------------------------------------------------
307// Typed read functions (6 storage types)

Callers 2

appendColumnValidityMethod · 0.80
TESTFunction · 0.80

Calls 3

ensureSizeMethod · 0.80
setValidMethod · 0.45
setNullMethod · 0.45

Tested by 1

TESTFunction · 0.64