|
|
static constexpr const ChunkInfoType | TYPE = ChunkInfoType::CONSTANT_INFO |
◆ ChunkConstantInfo()
| duckdb::ChunkConstantInfo::ChunkConstantInfo |
( |
idx_t | start | ) |
|
|
explicit |
427617 : ChunkInfo(
start, ChunkInfoType::CONSTANT_INFO), insert_id(0), delete_id(NOT_DELETED_ID) {
427618}
idx_t start
The row index of the first row.
Definition duckdb.hpp:22704
◆ GetSelVector()
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
Implements duckdb::ChunkInfo.
427631 {
427632 auto &transaction = options.transaction;
427633 if (options.insert_type == InsertedScanType::STANDARD) {
427634 if (!StandardInsertOperator::UseInsertedVersion(transaction.start_time, transaction.transaction_id,
427635 insert_id)) {
427636 return 0;
427637 }
427638 }
427640 if (StandardDeleteOperator::IsDeleted(transaction.start_time, transaction.transaction_id, delete_id)) {
427641 return 0;
427642 }
427644 if (CommittedDeleteOperator::IsDeleted(transaction.start_time, transaction.transaction_id, delete_id)) {
427645 return 0;
427646 }
427647 }
427648 return max_count;
427649}
@ 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
@ STANDARD
omit any rows that are deleted
Definition duckdb.hpp:22648
◆ Fetch()
Returns whether or not a single row in the ChunkInfo should be used or not for the given transaction.
Implements duckdb::ChunkInfo.
427651 {
427652 return UseVersion(transaction, insert_id) && !UseVersion(transaction, delete_id);
427653}
◆ CommitAppend()
Implements duckdb::ChunkInfo.
427655 {
427656 D_ASSERT(
start == 0 && end == STANDARD_VECTOR_SIZE);
427657 insert_id = commit_id;
427658}
◆ Cleanup()
| bool duckdb::ChunkConstantInfo::Cleanup |
( |
transaction_t | lowest_transaction | ) |
const |
|
overridevirtual |
Reimplemented from duckdb::ChunkInfo.
427668 {
427669 if (delete_id != NOT_DELETED_ID) {
427670
427671 return false;
427672 }
427673 if (insert_id > lowest_transaction) {
427674
427675 return false;
427676 }
427677 return true;
427678}
◆ ToString()
| string duckdb::ChunkConstantInfo::ToString |
( |
idx_t | max_count | ) |
const |
|
overridevirtual |
Implements duckdb::ChunkInfo.
427694 {
427695 string result;
427696 result +=
"Constant [Count: " +
to_string(max_count);
427697 result += ", ";
427698 result +=
"Insert Id: " +
to_string(insert_id);
427699 if (delete_id != NOT_DELETED_ID) {
427700 result +=
", Delete Id: " +
to_string(delete_id);
427701 }
427702 result += "]";
427703 return result;
427704}
std::string to_string(const T &value)
Definition duckdb.cpp:19425
◆ HasDeletes()
| bool duckdb::ChunkConstantInfo::HasDeletes |
( |
transaction_t | transaction_id = MAX_TRANSACTION_ID | ) |
const |
|
overridevirtual |
Implements duckdb::ChunkInfo.
427660 {
427661 if (transaction_id == MAX_TRANSACTION_ID) {
427662 transaction_id = TRANSACTION_ID_START - 1;
427663 }
427664 bool is_deleted = insert_id >= TRANSACTION_ID_START || delete_id <= transaction_id;
427665 return is_deleted;
427666}
◆ Write()
Reimplemented from duckdb::ChunkInfo.
427680 {
427681 D_ASSERT(HasDeletes(checkpoint_id));
427682 ChunkInfo::Write(writer, checkpoint_id);
427684}
uint64_t idx_t
a saner size_t for loop indices etc
Definition duckdb.hpp:237
◆ Read()
427686 {
427688 auto info = make_uniq<ChunkConstantInfo>(
start);
427689 info->insert_id = 0;
427690 info->delete_id = 0;
427691 return std::move(info);
427692}
◆ TemplatedGetSelVector()
template<class INSERT_OP, class DELETE_OP>
427622 {
427623 if (INSERT_OP::UseInsertedVersion(start_time, transaction_id, insert_id) &&
427624 !DELETE_OP::IsDeleted(start_time, transaction_id, delete_id)) {
427625 return max_count;
427626 }
427627 return 0;
427628}
The documentation for this class was generated from the following files: