MCPcopy Create free account
hub / github.com/apache/arrow / NextAndBlock

Function NextAndBlock

cpp/src/arrow/util/bit_block_counter.h:356–378  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354 int64_t right_offset, int64_t length);
355
356 BitBlockCount NextAndBlock() {
357 static constexpr int64_t kMaxBlockSize = std::numeric_limits<int16_t>::max();
358 switch (has_bitmap_) {
359 case HasBitmap::BOTH: {
360 BitBlockCount block = binary_counter_.NextAndWord();
361 position_ += block.length;
362 return block;
363 }
364 case HasBitmap::ONE: {
365 BitBlockCount block = unary_counter_.NextWord();
366 position_ += block.length;
367 return block;
368 }
369 case HasBitmap::NONE:
370 default: {
371 const int16_t block_size =
372 static_cast<int16_t>(std::min(kMaxBlockSize, length_ - position_));
373 position_ += block_size;
374 // All values are non-null
375 return {block_size, block_size};
376 }
377 }
378 }
379
380 BitBlockCount NextOrNotBlock() {
381 static constexpr int64_t kMaxBlockSize = std::numeric_limits<int16_t>::max();

Callers

nothing calls this directly

Calls 1

NextWordMethod · 0.45

Tested by

no test coverage detected