Kùzu C++ API
Loading...
Searching...
No Matches
kuzu::storage::Column Class Reference

#include <column.h>

Inheritance diagram for kuzu::storage::Column:
kuzu::storage::InternalIDColumn

Public Member Functions

 Column (std::string name, common::LogicalType dataType, BMFileHandle *dataFH, BufferManager *bufferManager, ShadowFile *shadowFile, bool enableCompression, bool requireNullColumn=true)
 
virtual ~Column ()
 
virtual void scan (transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInChunk, common::row_idx_t numValuesToScan, common::ValueVector *nodeIDVector, common::ValueVector *resultVector)
 
virtual void lookupValue (transaction::Transaction *transaction, const ChunkState &state, common::offset_t nodeOffset, common::ValueVector *resultVector, uint32_t posInVector)
 
virtual void scan (transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInGroup, common::offset_t endOffsetInGroup, common::ValueVector *resultVector, uint64_t offsetInVector)
 
virtual void scan (transaction::Transaction *transaction, const ChunkState &state, ColumnChunkData *columnChunk, common::offset_t startOffset=0, common::offset_t endOffset=common::INVALID_OFFSET)
 
common::LogicalTypegetDataType ()
 
const common::LogicalTypegetDataType () const
 
ColumngetNullColumn () const
 
std::string getName () const
 
virtual void scan (transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInGroup, common::offset_t endOffsetInGroup, uint8_t *result)
 
virtual void write (ColumnChunkData &persistentChunk, ChunkState &state, common::offset_t dstOffset, ColumnChunkData *data, common::offset_t srcOffset, common::length_t numValues)
 
common::offset_t appendValues (ColumnChunkData &persistentChunk, ChunkState &state, const uint8_t *data, const common::NullMask *nullChunkData, common::offset_t numValues)
 
virtual void checkpointColumnChunk (ColumnCheckpointState &checkpointState)
 
template<class TARGET >
TARGET & cast ()
 
template<class TARGET >
const TARGET & cast () const
 

Static Public Member Functions

static std::unique_ptr< ColumnChunkDataflushChunkData (const ColumnChunkData &chunkData, BMFileHandle &dataFH)
 
static std::unique_ptr< ColumnChunkDataflushNonNestedChunkData (const ColumnChunkData &chunkData, BMFileHandle &dataFH)
 
static ColumnChunkMetadata flushData (const ColumnChunkData &chunkData, BMFileHandle &dataFH)
 

Protected Member Functions

virtual void scanInternal (transaction::Transaction *transaction, const ChunkState &state, common::offset_t startOffsetInChunk, common::row_idx_t numValuesToScan, common::ValueVector *nodeIDVector, common::ValueVector *resultVector)
 
void scanUnfiltered (transaction::Transaction *transaction, PageCursor &pageCursor, uint64_t numValuesToScan, common::ValueVector *resultVector, const ColumnChunkMetadata &chunkMeta, uint64_t startPosInVector=0) const
 
void scanFiltered (transaction::Transaction *transaction, PageCursor &pageCursor, uint64_t numValuesToScan, const common::SelectionVector &selVector, common::ValueVector *resultVector, const ColumnChunkMetadata &chunkMeta) const
 
virtual void lookupInternal (transaction::Transaction *transaction, const ChunkState &state, common::offset_t nodeOffset, common::ValueVector *resultVector, uint32_t posInVector)
 
void readFromPage (transaction::Transaction *transaction, common::page_idx_t pageIdx, const std::function< void(uint8_t *)> &func) const
 
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)
 
void updatePageWithCursor (PageCursor cursor, const std::function< void(uint8_t *, common::offset_t)> &writeOp) const
 
void updateStatistics (ColumnChunkMetadata &metadata, common::offset_t maxIndex, const std::optional< StorageValue > &min, const std::optional< StorageValue > &max) const
 
bool isMaxOffsetOutOfPagesCapacity (const ColumnChunkMetadata &metadata, common::offset_t maxOffset) const
 
virtual bool canCheckpointInPlace (const ChunkState &state, const ColumnCheckpointState &checkpointState)
 
virtual void checkpointColumnChunkInPlace (ChunkState &state, const ColumnCheckpointState &checkpointState)
 
void checkpointNullData (const ColumnCheckpointState &checkpointState) const
 
virtual void checkpointColumnChunkOutOfPlace (ChunkState &state, const ColumnCheckpointState &checkpointState)
 

Static Protected Member Functions

static PageCursor getPageCursorForOffsetInGroup (common::offset_t offsetInChunk, const ChunkState &state)
 
static bool isInRange (uint64_t val, uint64_t start, uint64_t end)
 

Protected Attributes

std::string name
 
DBFileID dbFileID
 
common::LogicalType dataType
 
BMFileHandle * dataFH
 
BufferManager * bufferManager
 
ShadowFile * shadowFile
 
std::unique_ptr< NullColumn > nullColumn
 
read_values_to_vector_func_t readToVectorFunc
 
write_values_from_vector_func_t writeFromVectorFunc
 
write_values_func_t writeFunc
 
read_values_to_page_func_t readToPageFunc
 
batch_lookup_func_t batchLookupFunc
 
bool enableCompression
 

Friends

class StringColumn
 
class StructColumn
 
class ListColumn
 
class RelTableData
 

Constructor & Destructor Documentation

◆ Column()

kuzu::storage::Column::Column ( std::string name,
common::LogicalType dataType,
BMFileHandle * dataFH,
BufferManager * bufferManager,
ShadowFile * shadowFile,
bool enableCompression,
bool requireNullColumn = true )

◆ ~Column()

virtual kuzu::storage::Column::~Column ( )
virtual

Member Function Documentation

◆ appendValues()

common::offset_t kuzu::storage::Column::appendValues ( ColumnChunkData & persistentChunk,
ChunkState & state,
const uint8_t * data,
const common::NullMask * nullChunkData,
common::offset_t numValues )

◆ canCheckpointInPlace()

virtual bool kuzu::storage::Column::canCheckpointInPlace ( const ChunkState & state,
const ColumnCheckpointState & checkpointState )
protectedvirtual

◆ cast() [1/2]

template<class TARGET >
TARGET & kuzu::storage::Column::cast ( )
inline

◆ cast() [2/2]

template<class TARGET >
const TARGET & kuzu::storage::Column::cast ( ) const
inline

◆ checkpointColumnChunk()

virtual void kuzu::storage::Column::checkpointColumnChunk ( ColumnCheckpointState & checkpointState)
virtual

◆ checkpointColumnChunkInPlace()

virtual void kuzu::storage::Column::checkpointColumnChunkInPlace ( ChunkState & state,
const ColumnCheckpointState & checkpointState )
protectedvirtual

◆ checkpointColumnChunkOutOfPlace()

virtual void kuzu::storage::Column::checkpointColumnChunkOutOfPlace ( ChunkState & state,
const ColumnCheckpointState & checkpointState )
protectedvirtual

◆ checkpointNullData()

void kuzu::storage::Column::checkpointNullData ( const ColumnCheckpointState & checkpointState) const
protected

◆ flushChunkData()

static std::unique_ptr< ColumnChunkData > kuzu::storage::Column::flushChunkData ( const ColumnChunkData & chunkData,
BMFileHandle & dataFH )
static

◆ flushData()

static ColumnChunkMetadata kuzu::storage::Column::flushData ( const ColumnChunkData & chunkData,
BMFileHandle & dataFH )
static

◆ flushNonNestedChunkData()

static std::unique_ptr< ColumnChunkData > kuzu::storage::Column::flushNonNestedChunkData ( const ColumnChunkData & chunkData,
BMFileHandle & dataFH )
static

◆ getDataType() [1/2]

common::LogicalType & kuzu::storage::Column::getDataType ( )
inline

◆ getDataType() [2/2]

const common::LogicalType & kuzu::storage::Column::getDataType ( ) const
inline

◆ getName()

std::string kuzu::storage::Column::getName ( ) const
inline

◆ getNullColumn()

Column * kuzu::storage::Column::getNullColumn ( ) const

◆ getPageCursorForOffsetInGroup()

static PageCursor kuzu::storage::Column::getPageCursorForOffsetInGroup ( common::offset_t offsetInChunk,
const ChunkState & state )
staticprotected

◆ isInRange()

static bool kuzu::storage::Column::isInRange ( uint64_t val,
uint64_t start,
uint64_t end )
inlinestaticprotected

◆ isMaxOffsetOutOfPagesCapacity()

bool kuzu::storage::Column::isMaxOffsetOutOfPagesCapacity ( const ColumnChunkMetadata & metadata,
common::offset_t maxOffset ) const
protected

◆ lookupInternal()

virtual void kuzu::storage::Column::lookupInternal ( transaction::Transaction * transaction,
const ChunkState & state,
common::offset_t nodeOffset,
common::ValueVector * resultVector,
uint32_t posInVector )
protectedvirtual

◆ lookupValue()

virtual void kuzu::storage::Column::lookupValue ( transaction::Transaction * transaction,
const ChunkState & state,
common::offset_t nodeOffset,
common::ValueVector * resultVector,
uint32_t posInVector )
virtual

◆ readFromPage()

void kuzu::storage::Column::readFromPage ( transaction::Transaction * transaction,
common::page_idx_t pageIdx,
const std::function< void(uint8_t *)> & func ) const
protected

◆ scan() [1/4]

virtual void kuzu::storage::Column::scan ( transaction::Transaction * transaction,
const ChunkState & state,
ColumnChunkData * columnChunk,
common::offset_t startOffset = 0,
common::offset_t endOffset = common::INVALID_OFFSET )
virtual

◆ scan() [2/4]

virtual void kuzu::storage::Column::scan ( transaction::Transaction * transaction,
const ChunkState & state,
common::offset_t startOffsetInChunk,
common::row_idx_t numValuesToScan,
common::ValueVector * nodeIDVector,
common::ValueVector * resultVector )
virtual

◆ scan() [3/4]

virtual void kuzu::storage::Column::scan ( transaction::Transaction * transaction,
const ChunkState & state,
common::offset_t startOffsetInGroup,
common::offset_t endOffsetInGroup,
common::ValueVector * resultVector,
uint64_t offsetInVector )
virtual

◆ scan() [4/4]

virtual void kuzu::storage::Column::scan ( transaction::Transaction * transaction,
const ChunkState & state,
common::offset_t startOffsetInGroup,
common::offset_t endOffsetInGroup,
uint8_t * result )
virtual

◆ scanFiltered()

void kuzu::storage::Column::scanFiltered ( transaction::Transaction * transaction,
PageCursor & pageCursor,
uint64_t numValuesToScan,
const common::SelectionVector & selVector,
common::ValueVector * resultVector,
const ColumnChunkMetadata & chunkMeta ) const
protected

◆ scanInternal()

virtual void kuzu::storage::Column::scanInternal ( transaction::Transaction * transaction,
const ChunkState & state,
common::offset_t startOffsetInChunk,
common::row_idx_t numValuesToScan,
common::ValueVector * nodeIDVector,
common::ValueVector * resultVector )
protectedvirtual

◆ scanUnfiltered()

void kuzu::storage::Column::scanUnfiltered ( transaction::Transaction * transaction,
PageCursor & pageCursor,
uint64_t numValuesToScan,
common::ValueVector * resultVector,
const ColumnChunkMetadata & chunkMeta,
uint64_t startPosInVector = 0 ) const
protected

◆ updatePageWithCursor()

void kuzu::storage::Column::updatePageWithCursor ( PageCursor cursor,
const std::function< void(uint8_t *, common::offset_t)> & writeOp ) const
protected

◆ updateStatistics()

void kuzu::storage::Column::updateStatistics ( ColumnChunkMetadata & metadata,
common::offset_t maxIndex,
const std::optional< StorageValue > & min,
const std::optional< StorageValue > & max ) const
protected

◆ write()

virtual void kuzu::storage::Column::write ( ColumnChunkData & persistentChunk,
ChunkState & state,
common::offset_t dstOffset,
ColumnChunkData * data,
common::offset_t srcOffset,
common::length_t numValues )
virtual

◆ writeValues()

virtual void kuzu::storage::Column::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 )
protectedvirtual

Friends And Related Symbol Documentation

◆ ListColumn

friend class ListColumn
friend

◆ RelTableData

friend class RelTableData
friend

◆ StringColumn

friend class StringColumn
friend

◆ StructColumn

friend class StructColumn
friend

Member Data Documentation

◆ batchLookupFunc

batch_lookup_func_t kuzu::storage::Column::batchLookupFunc
protected

◆ bufferManager

BufferManager* kuzu::storage::Column::bufferManager
protected

◆ dataFH

BMFileHandle* kuzu::storage::Column::dataFH
protected

◆ dataType

common::LogicalType kuzu::storage::Column::dataType
protected

◆ dbFileID

DBFileID kuzu::storage::Column::dbFileID
protected

◆ enableCompression

bool kuzu::storage::Column::enableCompression
protected

◆ name

std::string kuzu::storage::Column::name
protected

◆ nullColumn

std::unique_ptr<NullColumn> kuzu::storage::Column::nullColumn
protected

◆ readToPageFunc

read_values_to_page_func_t kuzu::storage::Column::readToPageFunc
protected

◆ readToVectorFunc

read_values_to_vector_func_t kuzu::storage::Column::readToVectorFunc
protected

◆ shadowFile

ShadowFile* kuzu::storage::Column::shadowFile
protected

◆ writeFromVectorFunc

write_values_from_vector_func_t kuzu::storage::Column::writeFromVectorFunc
protected

◆ writeFunc

write_values_func_t kuzu::storage::Column::writeFunc
protected

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