Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb::RLEScanState< T > Struct Template Reference
Inheritance diagram for duckdb::RLEScanState< T >:
Collaboration diagram for duckdb::RLEScanState< T >:

Public Member Functions

 RLEScanState (ColumnSegment &segment)
void SkipInternal (rle_count_t *index_pointer, idx_t skip_count)
void Skip (ColumnSegment &segment, idx_t skip_count)
void ForwardToNextRun ()
bool ExhaustedRun (rle_count_t *index_pointer)
Public Member Functions inherited from duckdb::SegmentScanState
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Public Attributes

BufferHandle handle
idx_t entry_pos
idx_t position_in_entry
uint32_t rle_count_offset
unsafe_unique_array< bool > matching_runs
 If we are running a filter over the column - the runs that match the filter.
idx_t matching_run_count = 0

Constructor & Destructor Documentation

◆ RLEScanState()

template<class T>
duckdb::RLEScanState< T >::RLEScanState ( ColumnSegment & segment)
inlineexplicit
402706 {
402708 handle = buffer_manager.Pin(segment.block);
402709 entry_pos = 0;
402710 position_in_entry = 0;
402711 rle_count_offset = UnsafeNumericCast<uint32_t>(Load<uint64_t>(handle.Ptr() + segment.GetBlockOffset()));
402712 D_ASSERT(rle_count_offset <= segment.GetBlockSize());
402713 }
Definition duckdb.cpp:402705

Member Function Documentation

◆ SkipInternal()

template<class T>
void duckdb::RLEScanState< T >::SkipInternal ( rle_count_t * index_pointer,
idx_t skip_count )
inline
402715 {
402716 while (skip_count > 0) {
402717 rle_count_t run_end = index_pointer[entry_pos];
402718 idx_t skip_amount = MinValue<idx_t>(skip_count, run_end - position_in_entry);
402719
402721 position_in_entry += skip_amount;
402722 if (ExhaustedRun(index_pointer)) {
402723 ForwardToNextRun();
402724 }
402725 }
402726 }

◆ Skip()

template<class T>
void duckdb::RLEScanState< T >::Skip ( ColumnSegment & segment,
idx_t skip_count )
inline
402728 {
402729 auto data = handle.Ptr() + segment.GetBlockOffset();
402730 auto index_pointer = reinterpret_cast<rle_count_t *>(data + rle_count_offset);
402731 SkipInternal(index_pointer, skip_count);
402732 }

◆ ForwardToNextRun()

template<class T>
void duckdb::RLEScanState< T >::ForwardToNextRun ( )
inline
402734 {
402735 // handled all entries in this RLE value
402736 // move to the next entry
402737 entry_pos++;
402738 position_in_entry = 0;
402739 }

◆ ExhaustedRun()

template<class T>
bool duckdb::RLEScanState< T >::ExhaustedRun ( rle_count_t * index_pointer)
inline
402741 {
402742 return position_in_entry >= index_pointer[entry_pos];
402743 }

The documentation for this struct was generated from the following file: