12class ExpressionEvaluator;
16struct CompressionMetadata;
19 std::function<void(uint8_t* frame, PageCursor& pageCursor,
common::ValueVector* resultVector,
28 std::function<void(uint8_t* frame, PageCursor& pageCursor, uint8_t* result,
50 bool requireNullColumn =
true);
95 template<
class TARGET>
99 template<
class TARGET>
119 const std::function<
void(uint8_t*)>& func)
const;
132 const std::optional<StorageValue>& min,
const std::optional<StorageValue>& max)
const;
149 static bool isInRange(uint64_t val, uint64_t start, uint64_t end) {
150 return val >= start && val < end;
177 Column::scan(transaction, state, startOffsetInChunk, numValuesToScan, nodeIDVector,
179 populateCommonTableID(resultVector);
185 Column::scan(transaction, state, startOffsetInGroup, endOffsetInGroup, resultVector,
187 populateCommonTableID(resultVector);
192 uint32_t posInVector)
override {
194 populateCommonTableID(resultVector);
210 BMFileHandle* dataFH, BufferManager* bufferManager, ShadowFile* shadowFile,
211 bool enableCompression);
Definition null_mask.h:70
Definition sel_vector.h:12
Definition value_vector.h:20
Definition column_chunk_data.h:85
ShadowFile * shadowFile
Definition column.h:159
static PageCursor getPageCursorForOffsetInGroup(common::offset_t offsetInChunk, const ChunkState &state)
void scanUnfiltered(transaction::Transaction *transaction, PageCursor &pageCursor, uint64_t numValuesToScan, common::ValueVector *resultVector, const ColumnChunkMetadata &chunkMeta, uint64_t startPosInVector=0) const
virtual void checkpointColumnChunkOutOfPlace(ChunkState &state, const ColumnCheckpointState &checkpointState)
void updatePageWithCursor(PageCursor cursor, const std::function< void(uint8_t *, common::offset_t)> &writeOp) const
write_values_func_t writeFunc
Definition column.h:163
read_values_to_page_func_t readToPageFunc
Definition column.h:164
virtual void lookupValue(transaction::Transaction *transaction, const ChunkState &state, common::offset_t nodeOffset, common::ValueVector *resultVector, uint32_t posInVector)
static bool isInRange(uint64_t val, uint64_t start, uint64_t end)
Definition column.h:149
friend class RelTableData
Definition column.h:43
bool isMaxOffsetOutOfPagesCapacity(const ColumnChunkMetadata &metadata, common::offset_t maxOffset) const
virtual void scan(transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInGroup, common::offset_t endOffsetInGroup, common::ValueVector *resultVector, uint64_t offsetInVector)
const TARGET & cast() const
Definition column.h:100
static std::unique_ptr< ColumnChunkData > flushChunkData(const ColumnChunkData &chunkData, BMFileHandle &dataFH)
virtual void writeValues(ColumnChunkData &persistentChunk, ChunkState &state, common::offset_t dstOffset, const uint8_t *data, const common::NullMask *nullChunkData, common::offset_t srcOffset=0, common::offset_t numValues=1)
std::string name
Definition column.h:154
friend class StringColumn
Definition column.h:40
bool enableCompression
Definition column.h:166
common::LogicalType dataType
Definition column.h:156
virtual void checkpointColumnChunkInPlace(ChunkState &state, const ColumnCheckpointState &checkpointState)
read_values_to_vector_func_t readToVectorFunc
Definition column.h:161
write_values_from_vector_func_t writeFromVectorFunc
Definition column.h:162
void updateStatistics(ColumnChunkMetadata &metadata, common::offset_t maxIndex, const std::optional< StorageValue > &min, const std::optional< StorageValue > &max) const
virtual void scan(transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInGroup, common::offset_t endOffsetInGroup, uint8_t *result)
virtual void scan(transaction::Transaction *transaction, const ChunkState &state, ColumnChunkData *columnChunk, common::offset_t startOffset=0, common::offset_t endOffset=common::INVALID_OFFSET)
std::string getName() const
Definition column.h:79
virtual void checkpointColumnChunk(ColumnCheckpointState &checkpointState)
void checkpointNullData(const ColumnCheckpointState &checkpointState) const
virtual void write(ColumnChunkData &persistentChunk, ChunkState &state, common::offset_t dstOffset, ColumnChunkData *data, common::offset_t srcOffset, common::length_t numValues)
virtual void scanInternal(transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInChunk, common::row_idx_t numValuesToScan, common::ValueVector *nodeIDVector, common::ValueVector *resultVector)
static ColumnChunkMetadata flushData(const ColumnChunkData &chunkData, BMFileHandle &dataFH)
Column(std::string name, common::LogicalType dataType, BMFileHandle *dataFH, BufferManager *bufferManager, ShadowFile *shadowFile, bool enableCompression, bool requireNullColumn=true)
void readFromPage(transaction::Transaction *transaction, common::page_idx_t pageIdx, const std::function< void(uint8_t *)> &func) const
void scanFiltered(transaction::Transaction *transaction, PageCursor &pageCursor, uint64_t numValuesToScan, const common::SelectionVector &selVector, common::ValueVector *resultVector, const ColumnChunkMetadata &chunkMeta) const
static std::unique_ptr< ColumnChunkData > flushNonNestedChunkData(const ColumnChunkData &chunkData, BMFileHandle &dataFH)
TARGET & cast()
Definition column.h:96
Column * getNullColumn() const
virtual void scan(transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInChunk, common::row_idx_t numValuesToScan, common::ValueVector *nodeIDVector, common::ValueVector *resultVector)
const common::LogicalType & getDataType() const
Definition column.h:75
virtual bool canCheckpointInPlace(const ChunkState &state, const ColumnCheckpointState &checkpointState)
DBFileID dbFileID
Definition column.h:155
std::unique_ptr< NullColumn > nullColumn
Definition column.h:160
friend class ListColumn
Definition column.h:42
BMFileHandle * dataFH
Definition column.h:157
friend class StructColumn
Definition column.h:41
BufferManager * bufferManager
Definition column.h:158
virtual void lookupInternal(transaction::Transaction *transaction, const ChunkState &state, common::offset_t nodeOffset, common::ValueVector *resultVector, uint32_t posInVector)
common::offset_t appendValues(ColumnChunkData &persistentChunk, ChunkState &state, const uint8_t *data, const common::NullMask *nullChunkData, common::offset_t numValues)
common::LogicalType & getDataType()
Definition column.h:74
batch_lookup_func_t batchLookupFunc
Definition column.h:165
void setCommonTableID(common::table_id_t tableID)
Definition column.h:199
void lookupInternal(transaction::Transaction *transaction, const ChunkState &state, common::offset_t nodeOffset, common::ValueVector *resultVector, uint32_t posInVector) override
Definition column.h:190
void scan(transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInGroup, common::offset_t endOffsetInGroup, common::ValueVector *resultVector, uint64_t offsetInVector) override
Definition column.h:182
InternalIDColumn(std::string name, BMFileHandle *dataFH, BufferManager *bufferManager, ShadowFile *shadowFile, bool enableCompression)
void scan(transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInChunk, common::row_idx_t numValuesToScan, common::ValueVector *nodeIDVector, common::ValueVector *resultVector) override
Definition column.h:174
common::table_id_t getCommonTableID() const
Definition column.h:197
Definition transaction.h:28
uint64_t length_t
Definition types.h:53
constexpr offset_t INVALID_OFFSET
Definition internal_id_t.h:23
uint32_t page_idx_t
Definition types.h:26
uint64_t table_id_t
Definition internal_id_t.h:14
TO ku_dynamic_cast(FROM old)
Definition cast.h:11
uint64_t offset_t
Definition internal_id_t.h:22
uint64_t row_idx_t
Definition types.h:46
std::function< void(uint8_t *frame, uint16_t posInFrame, const uint8_t *data, common::offset_t dataOffset, common::offset_t numValues, const CompressionMetadata &metadata, const common::NullMask *)> write_values_func_t
Definition column.h:23
std::function< void(uint8_t *frame, uint16_t posInFrame, common::ValueVector *vector, uint32_t posInVector, const CompressionMetadata &metadata)> write_values_from_vector_func_t
Definition column.h:21
std::function< void(uint8_t *frame, PageCursor &pageCursor, common::ValueVector *resultVector, uint32_t posInVector, uint32_t numValuesToRead, const CompressionMetadata &metadata)> read_values_to_vector_func_t
Definition column.h:18
read_values_to_page_func_t batch_lookup_func_t
Definition column.h:31
std::function< void(uint8_t *frame, PageCursor &pageCursor, uint8_t *result, uint32_t posInResult, uint64_t numValues, const CompressionMetadata &metadata)> read_values_to_page_func_t
Definition column.h:27
Definition alter_type.h:5
Definition column_chunk_data.h:45
Definition column_chunk.h:19
static std::unique_ptr< Column > createColumn(std::string name, common::LogicalType dataType, BMFileHandle *dataFH, BufferManager *bufferManager, ShadowFile *shadowFile, bool enableCompression)
Definition db_file_id.h:15