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

#include <column_chunk_data.h>

Inheritance diagram for kuzu::storage::ColumnChunkData:
kuzu::storage::BoolChunkData kuzu::storage::InternalIDChunkData kuzu::storage::NullChunkData

Public Member Functions

 ColumnChunkData (common::LogicalType dataType, uint64_t capacity, bool enableCompression, ResidencyState residencyState, bool hasNullData)
 
 ColumnChunkData (common::LogicalType dataType, bool enableCompression, const ColumnChunkMetadata &metadata, bool hasNullData)
 
virtual ~ColumnChunkData ()=default
 
template<typename T >
getValue (common::offset_t pos) const
 
template<typename T >
void setValue (T val, common::offset_t pos)
 
bool isNull (common::offset_t pos) const
 
void setNullData (std::unique_ptr< NullChunkData > nullData_)
 
bool hasNullData () const
 
NullChunkDatagetNullData ()
 
const NullChunkDatagetNullData () const
 
std::optional< common::NullMaskgetNullMask () const
 
std::unique_ptr< NullChunkDatamoveNullData ()
 
common::LogicalTypegetDataType ()
 
const common::LogicalTypegetDataType () const
 
ResidencyState getResidencyState () const
 
bool isCompressionEnabled () const
 
ColumnChunkMetadatagetMetadata ()
 
const ColumnChunkMetadatagetMetadata () const
 
void setMetadata (const ColumnChunkMetadata &metadata_)
 
virtual void resetToAllNull ()
 
virtual void resetToEmpty ()
 
virtual ColumnChunkMetadata getMetadataToFlush () const
 
virtual void append (common::ValueVector *vector, const common::SelectionVector &selVector)
 
virtual void append (ColumnChunkData *other, common::offset_t startPosInOtherChunk, uint32_t numValuesToAppend)
 
virtual void flush (BMFileHandle &dataFH)
 
ColumnChunkMetadata flushBuffer (BMFileHandle *dataFH, common::page_idx_t startPageIdx, const ColumnChunkMetadata &metadata) const
 
uint64_t getNumBytesPerValue () const
 
uint8_t * getData () const
 
virtual void initializeScanState (ChunkState &state) const
 
virtual void scan (common::ValueVector &output, common::offset_t offset, common::length_t length, common::sel_t posInOutputVector=0) const
 
virtual void lookup (common::offset_t offsetInChunk, common::ValueVector &output, common::sel_t posInOutputVector) const
 
virtual void write (const common::ValueVector *vector, common::offset_t offsetInVector, common::offset_t offsetInChunk)
 
virtual void write (ColumnChunkData *chunk, ColumnChunkData *offsetsInChunk, common::RelMultiplicity multiplicity)
 
virtual void write (ColumnChunkData *srcChunk, common::offset_t srcOffsetInChunk, common::offset_t dstOffsetInChunk, common::offset_t numValuesToCopy)
 
virtual void copy (ColumnChunkData *srcChunk, common::offset_t srcOffsetInChunk, common::offset_t dstOffsetInChunk, common::offset_t numValuesToCopy)
 
virtual void setToInMemory ()
 
virtual void resize (uint64_t newCapacity)
 
void populateWithDefaultVal (evaluator::ExpressionEvaluator &defaultEvaluator, uint64_t &numValues_)
 
virtual void finalize ()
 
uint64_t getCapacity () const
 
virtual uint64_t getNumValues () const
 
virtual void resetNumValuesFromMetadata ()
 
virtual void setNumValues (uint64_t numValues_)
 
virtual void syncNumValues ()
 
virtual bool numValuesSanityCheck () const
 
virtual bool sanityCheck () const
 
virtual uint64_t getEstimatedMemoryUsage () const
 
virtual void serialize (common::Serializer &serializer) const
 
template<typename TARGET >
TARGET & cast ()
 
template<typename TARGET >
const TARGET & cast () const
 
template<>
void setValue (bool val, common::offset_t pos)
 
template<>
bool getValue (common::offset_t pos) const
 

Static Public Member Functions

static common::page_idx_t getNumPagesForBytes (uint64_t numBytes)
 
static std::unique_ptr< ColumnChunkDatadeserialize (common::Deserializer &deSer)
 

Protected Types

using flush_buffer_func_t
 
using get_metadata_func_t
 
using get_min_max_func_t
 

Protected Member Functions

void initializeBuffer ()
 
void initializeFunction (bool enableCompression)
 
void setToOnDisk (const ColumnChunkMetadata &metadata)
 
virtual void copyVectorToBuffer (common::ValueVector *vector, common::offset_t startPosInChunk, const common::SelectionVector &selVector)
 

Protected Attributes

ResidencyState residencyState
 
common::LogicalType dataType
 
bool enableCompression
 
uint32_t numBytesPerValue
 
uint64_t bufferSize
 
uint64_t capacity
 
std::unique_ptr< uint8_t[]> buffer
 
std::unique_ptr< NullChunkDatanullData
 
uint64_t numValues
 
flush_buffer_func_t flushBufferFunction
 
get_metadata_func_t getMetadataFunction
 
ColumnChunkMetadata metadata
 

Friends

struct ColumnChunkFactory
 

Member Typedef Documentation

◆ flush_buffer_func_t

Initial value:
std::function<ColumnChunkMetadata(const uint8_t*, uint64_t,
BMFileHandle*, common::page_idx_t, const ColumnChunkMetadata&)>
uint32_t page_idx_t
Definition types.h:26

◆ get_metadata_func_t

Initial value:
std::function<ColumnChunkMetadata(const uint8_t*, uint64_t,
uint64_t, uint64_t, StorageValue, StorageValue)>

◆ get_min_max_func_t

Initial value:
std::function<std::pair<StorageValue, StorageValue>(const uint8_t*, uint64_t)>

Constructor & Destructor Documentation

◆ ColumnChunkData() [1/2]

kuzu::storage::ColumnChunkData::ColumnChunkData ( common::LogicalType dataType,
uint64_t capacity,
bool enableCompression,
ResidencyState residencyState,
bool hasNullData )

◆ ColumnChunkData() [2/2]

kuzu::storage::ColumnChunkData::ColumnChunkData ( common::LogicalType dataType,
bool enableCompression,
const ColumnChunkMetadata & metadata,
bool hasNullData )

◆ ~ColumnChunkData()

virtual kuzu::storage::ColumnChunkData::~ColumnChunkData ( )
virtualdefault

Member Function Documentation

◆ append() [1/2]

virtual void kuzu::storage::ColumnChunkData::append ( ColumnChunkData * other,
common::offset_t startPosInOtherChunk,
uint32_t numValuesToAppend )
virtual

◆ append() [2/2]

virtual void kuzu::storage::ColumnChunkData::append ( common::ValueVector * vector,
const common::SelectionVector & selVector )
virtual

◆ cast() [1/2]

template<typename TARGET >
TARGET & kuzu::storage::ColumnChunkData::cast ( )
inline

◆ cast() [2/2]

template<typename TARGET >
const TARGET & kuzu::storage::ColumnChunkData::cast ( ) const
inline

◆ copy()

virtual void kuzu::storage::ColumnChunkData::copy ( ColumnChunkData * srcChunk,
common::offset_t srcOffsetInChunk,
common::offset_t dstOffsetInChunk,
common::offset_t numValuesToCopy )
virtual

◆ copyVectorToBuffer()

virtual void kuzu::storage::ColumnChunkData::copyVectorToBuffer ( common::ValueVector * vector,
common::offset_t startPosInChunk,
const common::SelectionVector & selVector )
protectedvirtual

◆ deserialize()

static std::unique_ptr< ColumnChunkData > kuzu::storage::ColumnChunkData::deserialize ( common::Deserializer & deSer)
static

◆ finalize()

virtual void kuzu::storage::ColumnChunkData::finalize ( )
inlinevirtual

◆ flush()

virtual void kuzu::storage::ColumnChunkData::flush ( BMFileHandle & dataFH)
virtual

◆ flushBuffer()

ColumnChunkMetadata kuzu::storage::ColumnChunkData::flushBuffer ( BMFileHandle * dataFH,
common::page_idx_t startPageIdx,
const ColumnChunkMetadata & metadata ) const

◆ getCapacity()

uint64_t kuzu::storage::ColumnChunkData::getCapacity ( ) const
inline

◆ getData()

uint8_t * kuzu::storage::ColumnChunkData::getData ( ) const
inline

◆ getDataType() [1/2]

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

◆ getDataType() [2/2]

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

◆ getEstimatedMemoryUsage()

virtual uint64_t kuzu::storage::ColumnChunkData::getEstimatedMemoryUsage ( ) const
virtual

◆ getMetadata() [1/2]

ColumnChunkMetadata & kuzu::storage::ColumnChunkData::getMetadata ( )
inline

◆ getMetadata() [2/2]

const ColumnChunkMetadata & kuzu::storage::ColumnChunkData::getMetadata ( ) const
inline

◆ getMetadataToFlush()

virtual ColumnChunkMetadata kuzu::storage::ColumnChunkData::getMetadataToFlush ( ) const
virtual

◆ getNullData() [1/2]

NullChunkData * kuzu::storage::ColumnChunkData::getNullData ( )
inline

◆ getNullData() [2/2]

const NullChunkData & kuzu::storage::ColumnChunkData::getNullData ( ) const
inline

◆ getNullMask()

std::optional< common::NullMask > kuzu::storage::ColumnChunkData::getNullMask ( ) const

◆ getNumBytesPerValue()

uint64_t kuzu::storage::ColumnChunkData::getNumBytesPerValue ( ) const
inline

◆ getNumPagesForBytes()

static common::page_idx_t kuzu::storage::ColumnChunkData::getNumPagesForBytes ( uint64_t numBytes)
inlinestatic

◆ getNumValues()

virtual uint64_t kuzu::storage::ColumnChunkData::getNumValues ( ) const
inlinevirtual

◆ getResidencyState()

ResidencyState kuzu::storage::ColumnChunkData::getResidencyState ( ) const
inline

◆ getValue() [1/2]

template<typename T >
T kuzu::storage::ColumnChunkData::getValue ( common::offset_t pos) const
inline

◆ getValue() [2/2]

template<>
bool kuzu::storage::ColumnChunkData::getValue ( common::offset_t pos) const
inline

◆ hasNullData()

bool kuzu::storage::ColumnChunkData::hasNullData ( ) const
inline

◆ initializeBuffer()

void kuzu::storage::ColumnChunkData::initializeBuffer ( )
protected

◆ initializeFunction()

void kuzu::storage::ColumnChunkData::initializeFunction ( bool enableCompression)
protected

◆ initializeScanState()

virtual void kuzu::storage::ColumnChunkData::initializeScanState ( ChunkState & state) const
virtual

◆ isCompressionEnabled()

bool kuzu::storage::ColumnChunkData::isCompressionEnabled ( ) const
inline

◆ isNull()

bool kuzu::storage::ColumnChunkData::isNull ( common::offset_t pos) const

◆ lookup()

virtual void kuzu::storage::ColumnChunkData::lookup ( common::offset_t offsetInChunk,
common::ValueVector & output,
common::sel_t posInOutputVector ) const
virtual

◆ moveNullData()

std::unique_ptr< NullChunkData > kuzu::storage::ColumnChunkData::moveNullData ( )
inline

◆ numValuesSanityCheck()

virtual bool kuzu::storage::ColumnChunkData::numValuesSanityCheck ( ) const
virtual

◆ populateWithDefaultVal()

void kuzu::storage::ColumnChunkData::populateWithDefaultVal ( evaluator::ExpressionEvaluator & defaultEvaluator,
uint64_t & numValues_ )

◆ resetNumValuesFromMetadata()

virtual void kuzu::storage::ColumnChunkData::resetNumValuesFromMetadata ( )
virtual

◆ resetToAllNull()

virtual void kuzu::storage::ColumnChunkData::resetToAllNull ( )
virtual

Reimplemented in kuzu::storage::NullChunkData.

◆ resetToEmpty()

virtual void kuzu::storage::ColumnChunkData::resetToEmpty ( )
virtual

Reimplemented in kuzu::storage::NullChunkData.

◆ resize()

virtual void kuzu::storage::ColumnChunkData::resize ( uint64_t newCapacity)
virtual

◆ sanityCheck()

virtual bool kuzu::storage::ColumnChunkData::sanityCheck ( ) const
virtual

◆ scan()

virtual void kuzu::storage::ColumnChunkData::scan ( common::ValueVector & output,
common::offset_t offset,
common::length_t length,
common::sel_t posInOutputVector = 0 ) const
virtual

◆ serialize()

virtual void kuzu::storage::ColumnChunkData::serialize ( common::Serializer & serializer) const
virtual

Reimplemented in kuzu::storage::NullChunkData.

◆ setMetadata()

void kuzu::storage::ColumnChunkData::setMetadata ( const ColumnChunkMetadata & metadata_)
inline

◆ setNullData()

void kuzu::storage::ColumnChunkData::setNullData ( std::unique_ptr< NullChunkData > nullData_)
inline

◆ setNumValues()

virtual void kuzu::storage::ColumnChunkData::setNumValues ( uint64_t numValues_)
virtual

◆ setToInMemory()

virtual void kuzu::storage::ColumnChunkData::setToInMemory ( )
virtual

◆ setToOnDisk()

void kuzu::storage::ColumnChunkData::setToOnDisk ( const ColumnChunkMetadata & metadata)
protected

◆ setValue() [1/2]

template<>
void kuzu::storage::ColumnChunkData::setValue ( bool val,
common::offset_t pos )
inline

◆ setValue() [2/2]

template<typename T >
void kuzu::storage::ColumnChunkData::setValue ( T val,
common::offset_t pos )
inline

◆ syncNumValues()

virtual void kuzu::storage::ColumnChunkData::syncNumValues ( )
inlinevirtual

◆ write() [1/3]

virtual void kuzu::storage::ColumnChunkData::write ( ColumnChunkData * chunk,
ColumnChunkData * offsetsInChunk,
common::RelMultiplicity multiplicity )
virtual

Reimplemented in kuzu::storage::BoolChunkData.

◆ write() [2/3]

virtual void kuzu::storage::ColumnChunkData::write ( ColumnChunkData * srcChunk,
common::offset_t srcOffsetInChunk,
common::offset_t dstOffsetInChunk,
common::offset_t numValuesToCopy )
virtual

◆ write() [3/3]

virtual void kuzu::storage::ColumnChunkData::write ( const common::ValueVector * vector,
common::offset_t offsetInVector,
common::offset_t offsetInChunk )
virtual

Friends And Related Symbol Documentation

◆ ColumnChunkFactory

friend struct ColumnChunkFactory
friend

Member Data Documentation

◆ buffer

std::unique_ptr<uint8_t[]> kuzu::storage::ColumnChunkData::buffer
protected

◆ bufferSize

uint64_t kuzu::storage::ColumnChunkData::bufferSize
protected

◆ capacity

uint64_t kuzu::storage::ColumnChunkData::capacity
protected

◆ dataType

common::LogicalType kuzu::storage::ColumnChunkData::dataType
protected

◆ enableCompression

bool kuzu::storage::ColumnChunkData::enableCompression
protected

◆ flushBufferFunction

flush_buffer_func_t kuzu::storage::ColumnChunkData::flushBufferFunction
protected

◆ getMetadataFunction

get_metadata_func_t kuzu::storage::ColumnChunkData::getMetadataFunction
protected

◆ metadata

ColumnChunkMetadata kuzu::storage::ColumnChunkData::metadata
protected

◆ nullData

std::unique_ptr<NullChunkData> kuzu::storage::ColumnChunkData::nullData
protected

◆ numBytesPerValue

uint32_t kuzu::storage::ColumnChunkData::numBytesPerValue
protected

◆ numValues

uint64_t kuzu::storage::ColumnChunkData::numValues
protected

◆ residencyState

ResidencyState kuzu::storage::ColumnChunkData::residencyState
protected

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