◆ IndexDataRemover()
445783}
IndexRemovalType removal_type
While committing, we remove data from any indexes that was deleted.
Definition duckdb.cpp:445605
◆ PushDelete()
| void duckdb::IndexDataRemover::PushDelete |
( |
DeleteInfo & | info | ) |
|
445785 {
445786 auto &version_table = *info.table;
445787 if (!version_table.HasIndexes()) {
445788
445789 return;
445790 }
445791
445793 row_t row_numbers[STANDARD_VECTOR_SIZE];
445794 if (info.is_consecutive) {
445795 for (
idx_t i = 0; i < info.count; i++) {
445796 row_numbers[count++] = UnsafeNumericCast<int64_t>(info.base_row + i);
445797 }
445798 } else {
445799 auto rows = info.GetRows();
445800 for (
idx_t i = 0; i < info.count; i++) {
445801 row_numbers[count++] = UnsafeNumericCast<int64_t>(info.base_row +
rows[i]);
445802 }
445803 }
445804 Flush(version_table, row_numbers, count);
445805}
int64_t row_t
The type used for row identifiers.
Definition duckdb.hpp:240
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
◆ Verify()
| void duckdb::IndexDataRemover::Verify |
( |
| ) |
|
445807 {
445808#ifdef DEBUG
445809
445811 table.second->VerifyIndexBuffers();
445812 }
445813#endif
445814}
reference_map_t< DataTable, shared_ptr< DataTableInfo > > verify_indexes
Debug mode only - list of indexes to verify.
Definition duckdb.cpp:445608
◆ Flush()
445820 {
445821 if (count == 0) {
445822 return;
445823 }
445824#ifdef DEBUG
445825 verify_indexes.insert(make_pair(reference<DataTable>(table), table.GetDataTableInfo()));
445826#endif
445827
445828
445829 Vector row_identifiers(LogicalType::ROW_TYPE, data_ptr_cast(row_numbers));
445830
445831 auto active_checkpoint = transaction.GetTransactionManager().Cast<DuckTransactionManager>().GetActiveCheckpoint();
445832 auto checkpoint_id = active_checkpoint == MAX_TRANSACTION_ID ? optional_idx() : active_checkpoint;
445833
445834
445835
445836 try {
445837 table.RemoveFromIndexes(context, row_identifiers, count,
removal_type, checkpoint_id);
445838 } catch (std::exception &ex) {
445839 throw FatalException(ErrorData(ex).Message());
445840 } catch (...) {
445841 throw FatalException("unknown failure in CommitState::Flush");
445842 }
445843
445844 count = 0;
445845}
The documentation for this struct was generated from the following file: