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::ChunkInfo Class Referenceabstract
Inheritance diagram for duckdb::ChunkInfo:

Public Member Functions

 ChunkInfo (idx_t start, ChunkInfoType type)
virtual idx_t GetSelVector (ScanOptions options, optional_ptr< SelectionVector > sel_vector, idx_t max_count) const =0
idx_t GetCheckpointRowCount (TransactionData transaction, idx_t max_count)
virtual bool Fetch (TransactionData transaction, row_t row)=0
 Returns whether or not a single row in the ChunkInfo should be used or not for the given transaction.
virtual void CommitAppend (transaction_t commit_id, idx_t start, idx_t end)=0
idx_t GetCommittedDeletedCount (idx_t max_count) const
virtual bool Cleanup (transaction_t lowest_transaction) const
virtual string ToString (idx_t max_count) const =0
virtual bool HasDeletes (transaction_t transaction_id=MAX_TRANSACTION_ID) const =0
virtual void Write (WriteStream &writer, transaction_t transaction_id) const
template<class TARGET>
TARGET & Cast ()
template<class TARGET>
const TARGET & Cast () const

Static Public Member Functions

static unique_ptr< ChunkInfo > Read (FixedSizeAllocator &allocator, ReadStream &reader)

Public Attributes

idx_t start
 The row index of the first row.
ChunkInfoType type
 The ChunkInfo type.

Constructor & Destructor Documentation

◆ ChunkInfo()

duckdb::ChunkInfo::ChunkInfo ( idx_t start,
ChunkInfoType type )
inline
22698 : start(start), type(type) {
22699 }
ChunkInfoType type
The ChunkInfo type.
Definition duckdb.hpp:22706
idx_t start
The row index of the first row.
Definition duckdb.hpp:22704

◆ ~ChunkInfo()

virtual duckdb::ChunkInfo::~ChunkInfo ( )
inlinevirtual
22700 {
22701 }

Member Function Documentation

◆ GetSelVector()

virtual idx_t duckdb::ChunkInfo::GetSelVector ( ScanOptions options,
optional_ptr< SelectionVector > sel_vector,
idx_t max_count ) const
pure virtual

Gets up to max_count entries from the chunk info. If the ret is 0>ret>max_count, the selection vector is filled with the tuples

Implemented in duckdb::ChunkConstantInfo, and duckdb::ChunkVectorInfo.

◆ GetCheckpointRowCount()

idx_t duckdb::ChunkInfo::GetCheckpointRowCount ( TransactionData transaction,
idx_t max_count )
427607 {
427608 ScanOptions options(transaction);
427609 options.delete_type = DeletedScanType::INCLUDE_ALL_DELETED;
427610 return GetSelVector(options, nullptr, max_count);
427611}
virtual idx_t GetSelVector(ScanOptions options, optional_ptr< SelectionVector > sel_vector, idx_t max_count) const =0
@ INCLUDE_ALL_DELETED
include all rows, including all deleted rows
Definition duckdb.hpp:22650

◆ Fetch()

virtual bool duckdb::ChunkInfo::Fetch ( TransactionData transaction,
row_t row )
pure virtual

Returns whether or not a single row in the ChunkInfo should be used or not for the given transaction.

Implemented in duckdb::ChunkConstantInfo, and duckdb::ChunkVectorInfo.

◆ GetCommittedDeletedCount()

idx_t duckdb::ChunkInfo::GetCommittedDeletedCount ( idx_t max_count) const
427599 {
427600 ScanOptions options(TransactionData(0, TRANSACTION_ID_START));
427601 options.insert_type = InsertedScanType::ALL_ROWS;
427602 options.delete_type = DeletedScanType::OMIT_COMMITTED_DELETES;
427603 idx_t not_deleted_count = GetSelVector(options, nullptr, max_count);
427604 return max_count - not_deleted_count;
427605}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
@ OMIT_COMMITTED_DELETES
omit only deleted rows that have been committed and have a commit ts lower than the transaction start
Definition duckdb.hpp:22652

◆ Cleanup()

bool duckdb::ChunkInfo::Cleanup ( transaction_t lowest_transaction) const
virtual
427577 {
427578 return false;
427579}

◆ Write()

void duckdb::ChunkInfo::Write ( WriteStream & writer,
transaction_t transaction_id ) const
virtual
427581 {
427582 writer.Write<ChunkInfoType>(type);
427583}

◆ Read()

unique_ptr< ChunkInfo > duckdb::ChunkInfo::Read ( FixedSizeAllocator & allocator,
ReadStream & reader )
static
427585 {
427586 auto type = reader.Read<ChunkInfoType>();
427587 switch (type) {
427588 case ChunkInfoType::EMPTY_INFO:
427589 return nullptr;
427590 case ChunkInfoType::CONSTANT_INFO:
427591 return ChunkConstantInfo::Read(reader);
427592 case ChunkInfoType::VECTOR_INFO:
427593 return ChunkVectorInfo::Read(allocator, reader);
427594 default:
427595 throw SerializationException("Could not deserialize Chunk Info Type: unrecognized type");
427596 }
427597}

◆ Cast() [1/2]

template<class TARGET>
TARGET & duckdb::ChunkInfo::Cast ( )
inline
22728 {
22729 if (type != TARGET::TYPE) {
22730 throw InternalException("Failed to cast chunk info to type - query result type mismatch");
22731 }
22732 return reinterpret_cast<TARGET &>(*this);
22733 }

◆ Cast() [2/2]

template<class TARGET>
const TARGET & duckdb::ChunkInfo::Cast ( ) const
inline
22736 {
22737 if (type != TARGET::TYPE) {
22738 throw InternalException("Failed to cast chunk info to type - query result type mismatch");
22739 }
22740 return reinterpret_cast<const TARGET &>(*this);
22741 }

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