28 for (
const auto& chunkCheckpointState : this->chunkCheckpointStates) {
29 const auto endRowIdx = chunkCheckpointState.startRow + chunkCheckpointState.numRows;
43 ColumnChunk(
bool enableCompression, std::unique_ptr<ColumnChunkData> data);
49 template<Res
idencyState SCAN_RESIDENCY_STATE>
66 void setNumValues(
const uint64_t numValues)
const { data->setNumValues(numValues); }
70 std::pair<std::unique_ptr<ColumnChunk>, std::unique_ptr<ColumnChunk>>
scanUpdates(
73 void setData(std::unique_ptr<ColumnChunkData> data) { this->data = std::move(data); }
77 std::unique_ptr<ColumnChunkData>
moveData() {
return std::move(data); }
84 bool hasUpdates()
const {
return updateInfo !=
nullptr; }
90 void resize(uint64_t newSize)
const { data->resize(newSize); }
105 bool enableCompression;
106 std::unique_ptr<ColumnChunkData> data;
108 std::unique_ptr<UpdateInfo> updateInfo;
Definition deserializer.h:15
Definition serializer.h:15
Definition value_vector.h:20
Definition column_chunk_data.h:85
Definition column_chunk.h:37
std::unique_ptr< ColumnChunkData > moveData()
Definition column_chunk.h:77
common::LogicalType & getDataType()
Definition column_chunk.h:79
bool hasUpdates() const
Definition column_chunk.h:84
uint64_t getNumValues() const
Definition column_chunk.h:65
std::pair< std::unique_ptr< ColumnChunk >, std::unique_ptr< ColumnChunk > > scanUpdates(const transaction::Transaction *transaction) const
void lookup(transaction::Transaction *transaction, const ChunkState &state, common::offset_t rowInChunk, common::ValueVector &output, common::sel_t posInOutputVector) const
void serialize(common::Serializer &serializer) const
ResidencyState getResidencyState() const
Definition column_chunk.h:83
const common::LogicalType & getDataType() const
Definition column_chunk.h:80
void setNumValues(const uint64_t numValues) const
Definition column_chunk.h:66
bool hasUpdates(const transaction::Transaction *transaction, common::row_idx_t startRow, common::length_t numRows) const
void resetToEmpty() const
Definition column_chunk.h:88
void update(const transaction::Transaction *transaction, common::offset_t offsetInChunk, const common::ValueVector &values)
common::row_idx_t getNumUpdatedRows(const transaction::Transaction *transaction) const
void scan(const transaction::Transaction *transaction, const ChunkState &state, common::ValueVector &nodeID, common::ValueVector &output, common::offset_t offsetInChunk, common::length_t length) const
static std::unique_ptr< ColumnChunk > deserialize(common::Deserializer &deSer)
void resetUpdateInfo()
Definition column_chunk.h:91
ColumnChunk(const common::LogicalType &dataType, uint64_t capacity, bool enableCompression, ResidencyState residencyState)
ColumnChunk(bool enableCompression, std::unique_ptr< ColumnChunkData > data)
uint64_t getEstimatedMemoryUsage() const
Definition column_chunk.h:59
ColumnChunk(const common::LogicalType &dataType, bool enableCompression, ColumnChunkMetadata metadata)
void resetToAllNull() const
Definition column_chunk.h:89
ColumnChunkData & getData() const
Definition column_chunk.h:75
const ColumnChunkData & getConstData() const
Definition column_chunk.h:76
void resize(uint64_t newSize) const
Definition column_chunk.h:90
void initializeScanState(ChunkState &state) const
void scanCommitted(transaction::Transaction *transaction, ChunkState &chunkState, ColumnChunk &output, common::row_idx_t startRow=0, common::row_idx_t numRows=common::INVALID_ROW_IDX) const
bool isCompressionEnabled() const
Definition column_chunk.h:81
void setData(std::unique_ptr< ColumnChunkData > data)
Definition column_chunk.h:73
Definition transaction.h:28
uint64_t length_t
Definition types.h:53
constexpr row_idx_t INVALID_ROW_IDX
Definition types.h:47
uint64_t sel_t
Definition types.h:24
uint64_t offset_t
Definition internal_id_t.h:22
uint64_t row_idx_t
Definition types.h:46
ResidencyState
Definition residency_state.h:11
Definition alter_type.h:5
Definition column_chunk.h:9
std::unique_ptr< ColumnChunkData > chunkData
Definition column_chunk.h:10
common::row_idx_t startRow
Definition column_chunk.h:11
ChunkCheckpointState(std::unique_ptr< ColumnChunkData > chunkData, common::row_idx_t startRow, common::length_t numRows)
Definition column_chunk.h:14
common::length_t numRows
Definition column_chunk.h:12
Definition column_chunk_data.h:45
Definition column_chunk.h:19
common::row_idx_t maxRowIdxToWrite
Definition column_chunk.h:22
ColumnCheckpointState(ColumnChunkData &persistentData, std::vector< ChunkCheckpointState > chunkCheckpointStates)
Definition column_chunk.h:24
ColumnChunkData & persistentData
Definition column_chunk.h:20
std::vector< ChunkCheckpointState > chunkCheckpointStates
Definition column_chunk.h:21