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

Public Member Functions

 VersionDeleteState (RowGroup &info, TransactionData transaction, DataTable &table, idx_t base_row)
void Delete (row_t row_id)
void Flush ()

Public Attributes

RowGroup & info
TransactionData transaction
DataTable & table
idx_t current_chunk
row_t rows [STANDARD_VECTOR_SIZE]
idx_t count
idx_t base_row
idx_t chunk_row
idx_t delete_count

Constructor & Destructor Documentation

◆ VersionDeleteState()

duckdb::VersionDeleteState::VersionDeleteState ( RowGroup & info,
TransactionData transaction,
DataTable & table,
idx_t base_row )
inline
434404 : info(info), transaction(transaction), table(table), current_chunk(DConstants::INVALID_INDEX), count(0),
434405 base_row(base_row), delete_count(0) {
434406 }
static constexpr const idx_t INVALID_INDEX
The value used to signify an invalid index entry.
Definition duckdb.hpp:1117

Member Function Documentation

◆ Delete()

void duckdb::VersionDeleteState::Delete ( row_t row_id)
434452 {
434453 D_ASSERT(row_id >= 0);
434454 idx_t vector_idx = UnsafeNumericCast<idx_t>(row_id) / STANDARD_VECTOR_SIZE;
434455 idx_t idx_in_vector = UnsafeNumericCast<idx_t>(row_id) - vector_idx * STANDARD_VECTOR_SIZE;
434456 if (current_chunk != vector_idx) {
434457 Flush();
434458
434459 current_chunk = vector_idx;
434460 chunk_row = vector_idx * STANDARD_VECTOR_SIZE;
434461 }
434462 rows[count++] = UnsafeNumericCast<row_t>(idx_in_vector);
434463}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237

◆ Flush()

void duckdb::VersionDeleteState::Flush ( )
434465 {
434466 if (count == 0) {
434467 return;
434468 }
434469 // it is possible for delete statements to delete the same tuple multiple times when combined with a USING clause
434470 // in the current_info->Delete, we check which tuples are actually deleted (excluding duplicate deletions)
434471 // this is returned in the actual_delete_count
434472 auto actual_delete_count = info.DeleteRows(current_chunk, transaction.transaction_id, rows, count);
434473 delete_count += actual_delete_count;
434474 if (transaction.transaction && actual_delete_count > 0) {
434475 // now push the delete into the undo buffer, but only if any deletes were actually performed
434476 transaction.transaction->PushDelete(table, info.GetOrCreateVersionInfo(), current_chunk, rows,
434477 actual_delete_count, base_row + chunk_row);
434478 }
434479 count = 0;
434480}

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