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::BatchCollectionChunkScanState Class Reference
Inheritance diagram for duckdb::BatchCollectionChunkScanState:
Collaboration diagram for duckdb::BatchCollectionChunkScanState:

Public Member Functions

 BatchCollectionChunkScanState (BatchedDataCollection &collection, BatchedChunkIteratorRange &range, ClientContext &context)
 BatchCollectionChunkScanState (const BatchCollectionChunkScanState &other)=delete
BatchCollectionChunkScanState & operator= (const BatchCollectionChunkScanState &other)=delete
 BatchCollectionChunkScanState (BatchCollectionChunkScanState &&other)=default
bool LoadNextChunk (ErrorData &error) override
bool HasError () const override
ErrorData & GetError () override
const vector< LogicalType > & Types () const override
const vector< string > & Names () const override
Public Member Functions inherited from duckdb::ChunkScanState
 ChunkScanState (const ChunkScanState &other)=delete
 ChunkScanState (ChunkScanState &&other)=default
ChunkScanState & operator= (const ChunkScanState &other)=delete
ChunkScanState & operator= (ChunkScanState &&other)=default
idx_t CurrentOffset () const
idx_t RemainingInChunk () const
DataChunk & CurrentChunk ()
bool ChunkIsEmpty () const
bool Finished () const
bool ScanStarted () const
void IncreaseOffset (idx_t increment, bool unsafe=false)

Private Member Functions

void InternalLoad (ErrorData &error)

Private Attributes

BatchedDataCollection & collection
BatchedChunkScanState state

Additional Inherited Members

Protected Attributes inherited from duckdb::ChunkScanState
idx_t offset = 0
bool finished = false
unique_ptr< DataChunk > current_chunk

Constructor & Destructor Documentation

◆ BatchCollectionChunkScanState()

duckdb::BatchCollectionChunkScanState::BatchCollectionChunkScanState ( BatchedDataCollection & collection,
BatchedChunkIteratorRange & range,
ClientContext & context )
271939 : ChunkScanState(), collection(collection) {
271940 collection.InitializeScan(state, range);
271941 current_chunk = make_uniq<DataChunk>();
271942 auto &allocator = BufferManager::GetBufferManager(context).GetBufferAllocator();
271943 current_chunk->Initialize(allocator, collection.Types());
271944}

◆ ~BatchCollectionChunkScanState()

duckdb::BatchCollectionChunkScanState::~BatchCollectionChunkScanState ( )
override
271946 {
271947}

Member Function Documentation

◆ LoadNextChunk()

bool duckdb::BatchCollectionChunkScanState::LoadNextChunk ( ErrorData & error)
overridevirtual

Implements duckdb::ChunkScanState.

271977 {
271978 if (finished) {
271979 return false;
271980 }
271981 InternalLoad(error);
271982 if (ChunkIsEmpty()) {
271983 finished = true;
271984 }
271985 return true;
271986}

◆ HasError()

bool duckdb::BatchCollectionChunkScanState::HasError ( ) const
overridevirtual

Implements duckdb::ChunkScanState.

271961 {
271962 return false;
271963}

◆ GetError()

ErrorData & duckdb::BatchCollectionChunkScanState::GetError ( )
overridevirtual

Implements duckdb::ChunkScanState.

271965 {
271966 throw NotImplementedException("BatchDataCollections don't have an internal error object");
271967}

◆ Types()

const vector< LogicalType > & duckdb::BatchCollectionChunkScanState::Types ( ) const
overridevirtual

Implements duckdb::ChunkScanState.

271969 {
271970 return collection.Types();
271971}

◆ Names()

const vector< string > & duckdb::BatchCollectionChunkScanState::Names ( ) const
overridevirtual

Implements duckdb::ChunkScanState.

271973 {
271974 throw NotImplementedException("BatchDataCollections don't have names");
271975}

◆ InternalLoad()

void duckdb::BatchCollectionChunkScanState::InternalLoad ( ErrorData & error)
private
271949 {
271950 if (state.range.begin == state.range.end) {
271951 // Signal empty chunk to break out of the loop
271952 current_chunk->SetCardinality(0);
271953 return;
271954 }
271955 offset = 0;
271956 current_chunk->Reset();
271957 collection.Scan(state, *current_chunk);
271958 return;
271959}

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