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

Method next

src/Storages/MergeTree/MergeTreeIndexTextPostingListCursor.cpp:453–487  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453void PostingListCursor::next()
454{
455 if (!is_valid)
456 return;
457
458 ++index;
459
460 if (is_embedded)
461 {
462 if (index >= decoded_count)
463 is_valid = false;
464 return;
465 }
466
467 if (index >= decoded_count)
468 {
469 ++current_block;
470 if (current_block < current_segment->block_count)
471 {
472 decodeBlock(current_block);
473 return;
474 }
475
476 /// Current segment exhausted — advance to next one.
477 size_t next_segment = current_segment_idx + 1;
478 if (next_segment >= total_segments)
479 {
480 is_valid = false;
481 return;
482 }
483
484 prepareSegment(next_segment);
485 decodeBlock(0);
486 }
487}
488
489/// Scatter-write into `out` for doc_ids in values[begin..length).
490/// PadOp::Or assigns 1, PadOp::And increments the counter.

Callers 15

checkDataPartFunction · 0.45
BackupImplFunction · 0.45
intersectTwoFunction · 0.45
intersectThreeFunction · 0.45
intersectFourFunction · 0.45
intersectLeapfrogLinearFunction · 0.45
intersectLeapfrogHeapFunction · 0.45
loadDataPartsMethod · 0.45

Calls

no outgoing calls

Tested by 2

drainCursorFunction · 0.36
TESTFunction · 0.36