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

#include <chunked_node_group.h>

Public Member Functions

 ChunkedNodeGroup (std::vector< std::unique_ptr< ColumnChunk > > chunks, common::row_idx_t startRowIdx, NodeGroupDataFormat format=NodeGroupDataFormat::REGULAR)
 
 ChunkedNodeGroup (ChunkedNodeGroup &base, const std::vector< common::column_id_t > &selectedColumns)
 
 ChunkedNodeGroup (const std::vector< common::LogicalType > &columnTypes, bool enableCompression, uint64_t capacity, common::row_idx_t startRowIdx, ResidencyState residencyState, NodeGroupDataFormat format=NodeGroupDataFormat::REGULAR)
 
virtual ~ChunkedNodeGroup ()=default
 
common::idx_t getNumColumns () const
 
common::row_idx_t getStartRowIdx () const
 
common::row_idx_t getNumRows () const
 
common::row_idx_t getCapacity () const
 
const ColumnChunkgetColumnChunk (const common::column_id_t columnID) const
 
ColumnChunkgetColumnChunk (const common::column_id_t columnID)
 
std::unique_ptr< ColumnChunkmoveColumnChunk (const common::column_id_t columnID)
 
bool isFullOrOnDisk () const
 
ResidencyState getResidencyState () const
 
NodeGroupDataFormat getFormat () const
 
void resetToEmpty ()
 
void resetToAllNull () const
 
void resetNumRowsFromChunks ()
 
void setNumRows (common::offset_t numRows_)
 
void resizeChunks (uint64_t newSize)
 
void setVersionInfo (std::unique_ptr< VersionInfo > versionInfo)
 
void resetVersionAndUpdateInfo ()
 
uint64_t append (const transaction::Transaction *transaction, const std::vector< common::ValueVector * > &columnVectors, common::row_idx_t startRowInVectors, uint64_t numValuesToAppend)
 
common::offset_t append (const transaction::Transaction *transaction, const ChunkedNodeGroup &other, common::offset_t offsetInOtherNodeGroup, common::offset_t numRowsToAppend)
 
common::offset_t append (const transaction::Transaction *transaction, const std::vector< ColumnChunk * > &other, common::offset_t offsetInOtherNodeGroup, common::offset_t numRowsToAppend)
 
void write (const ChunkedNodeGroup &data, common::column_id_t offsetColumnID)
 
void scan (const transaction::Transaction *transaction, const TableScanState &scanState, const NodeGroupScanState &nodeGroupScanState, common::offset_t rowIdxInGroup, common::length_t numRowsToScan) const
 
template<ResidencyState SCAN_RESIDENCY_STATE>
void scanCommitted (transaction::Transaction *transaction, TableScanState &scanState, NodeGroupScanState &nodeGroupScanState, ChunkedNodeGroup &output) const
 
bool hasUpdates () const
 
common::row_idx_t getNumDeletedRows (const transaction::Transaction *transaction) const
 
common::row_idx_t getNumUpdatedRows (const transaction::Transaction *transaction, common::column_id_t columnID)
 
std::pair< std::unique_ptr< ColumnChunk >, std::unique_ptr< ColumnChunk > > scanUpdates (transaction::Transaction *transaction, common::column_id_t columnID)
 
bool lookup (transaction::Transaction *transaction, const TableScanState &state, NodeGroupScanState &nodeGroupScanState, common::offset_t rowIdxInChunk, common::sel_t posInOutput) const
 
void update (transaction::Transaction *transaction, common::row_idx_t rowIdxInChunk, common::column_id_t columnID, const common::ValueVector &propertyVector)
 
bool delete_ (const transaction::Transaction *transaction, common::row_idx_t rowIdxInChunk)
 
void addColumn (transaction::Transaction *transaction, const TableAddColumnState &addColumnState, bool enableCompression, BMFileHandle *dataFH)
 
bool isDeleted (const transaction::Transaction *transaction, common::row_idx_t rowInChunk) const
 
bool isInserted (const transaction::Transaction *transaction, common::row_idx_t rowInChunk) const
 
bool hasAnyUpdates (const transaction::Transaction *transaction, common::column_id_t columnID, common::row_idx_t startRow, common::length_t numRows) const
 
common::row_idx_t getNumDeletions (const transaction::Transaction *transaction, common::row_idx_t startRow, common::length_t numRows) const
 
bool hasVersionInfo () const
 
void finalize () const
 
virtual void writeToColumnChunk (common::idx_t chunkIdx, common::idx_t vectorIdx, const std::vector< std::unique_ptr< ColumnChunk > > &data, ColumnChunk &offsetChunk)
 
virtual std::unique_ptr< ChunkedNodeGroupflushAsNewChunkedNodeGroup (transaction::Transaction *transaction, BMFileHandle &dataFH) const
 
virtual void flush (BMFileHandle &dataFH)
 
uint64_t getEstimatedMemoryUsage () const
 
virtual void serialize (common::Serializer &serializer) const
 
template<class TARGET >
TARGET & cast ()
 
template<class TARGETT >
const TARGETT & cast () const
 

Static Public Member Functions

static std::unique_ptr< ChunkedNodeGroupdeserialize (common::Deserializer &deSer)
 

Static Public Attributes

static constexpr uint64_t CHUNK_CAPACITY = 2048
 

Protected Attributes

NodeGroupDataFormat format
 
ResidencyState residencyState
 
common::row_idx_t startRowIdx
 
uint64_t capacity
 
std::atomic< common::row_idx_tnumRows
 
std::vector< std::unique_ptr< ColumnChunk > > chunks
 
std::unique_ptr< VersionInfoversionInfo
 

Constructor & Destructor Documentation

◆ ChunkedNodeGroup() [1/3]

kuzu::storage::ChunkedNodeGroup::ChunkedNodeGroup ( std::vector< std::unique_ptr< ColumnChunk > > chunks,
common::row_idx_t startRowIdx,
NodeGroupDataFormat format = NodeGroupDataFormat::REGULAR )

◆ ChunkedNodeGroup() [2/3]

kuzu::storage::ChunkedNodeGroup::ChunkedNodeGroup ( ChunkedNodeGroup & base,
const std::vector< common::column_id_t > & selectedColumns )

◆ ChunkedNodeGroup() [3/3]

kuzu::storage::ChunkedNodeGroup::ChunkedNodeGroup ( const std::vector< common::LogicalType > & columnTypes,
bool enableCompression,
uint64_t capacity,
common::row_idx_t startRowIdx,
ResidencyState residencyState,
NodeGroupDataFormat format = NodeGroupDataFormat::REGULAR )

◆ ~ChunkedNodeGroup()

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

Member Function Documentation

◆ addColumn()

void kuzu::storage::ChunkedNodeGroup::addColumn ( transaction::Transaction * transaction,
const TableAddColumnState & addColumnState,
bool enableCompression,
BMFileHandle * dataFH )

◆ append() [1/3]

common::offset_t kuzu::storage::ChunkedNodeGroup::append ( const transaction::Transaction * transaction,
const ChunkedNodeGroup & other,
common::offset_t offsetInOtherNodeGroup,
common::offset_t numRowsToAppend )

◆ append() [2/3]

common::offset_t kuzu::storage::ChunkedNodeGroup::append ( const transaction::Transaction * transaction,
const std::vector< ColumnChunk * > & other,
common::offset_t offsetInOtherNodeGroup,
common::offset_t numRowsToAppend )

◆ append() [3/3]

uint64_t kuzu::storage::ChunkedNodeGroup::append ( const transaction::Transaction * transaction,
const std::vector< common::ValueVector * > & columnVectors,
common::row_idx_t startRowInVectors,
uint64_t numValuesToAppend )

◆ cast() [1/2]

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

◆ cast() [2/2]

template<class TARGETT >
const TARGETT & kuzu::storage::ChunkedNodeGroup::cast ( ) const
inline

◆ delete_()

bool kuzu::storage::ChunkedNodeGroup::delete_ ( const transaction::Transaction * transaction,
common::row_idx_t rowIdxInChunk )

◆ deserialize()

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

◆ finalize()

void kuzu::storage::ChunkedNodeGroup::finalize ( ) const

◆ flush()

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

◆ flushAsNewChunkedNodeGroup()

virtual std::unique_ptr< ChunkedNodeGroup > kuzu::storage::ChunkedNodeGroup::flushAsNewChunkedNodeGroup ( transaction::Transaction * transaction,
BMFileHandle & dataFH ) const
virtual

◆ getCapacity()

common::row_idx_t kuzu::storage::ChunkedNodeGroup::getCapacity ( ) const
inline

◆ getColumnChunk() [1/2]

ColumnChunk & kuzu::storage::ChunkedNodeGroup::getColumnChunk ( const common::column_id_t columnID)
inline

◆ getColumnChunk() [2/2]

const ColumnChunk & kuzu::storage::ChunkedNodeGroup::getColumnChunk ( const common::column_id_t columnID) const
inline

◆ getEstimatedMemoryUsage()

uint64_t kuzu::storage::ChunkedNodeGroup::getEstimatedMemoryUsage ( ) const

◆ getFormat()

NodeGroupDataFormat kuzu::storage::ChunkedNodeGroup::getFormat ( ) const
inline

◆ getNumColumns()

common::idx_t kuzu::storage::ChunkedNodeGroup::getNumColumns ( ) const
inline

◆ getNumDeletedRows()

common::row_idx_t kuzu::storage::ChunkedNodeGroup::getNumDeletedRows ( const transaction::Transaction * transaction) const

◆ getNumDeletions()

common::row_idx_t kuzu::storage::ChunkedNodeGroup::getNumDeletions ( const transaction::Transaction * transaction,
common::row_idx_t startRow,
common::length_t numRows ) const

◆ getNumRows()

common::row_idx_t kuzu::storage::ChunkedNodeGroup::getNumRows ( ) const
inline

◆ getNumUpdatedRows()

common::row_idx_t kuzu::storage::ChunkedNodeGroup::getNumUpdatedRows ( const transaction::Transaction * transaction,
common::column_id_t columnID )

◆ getResidencyState()

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

◆ getStartRowIdx()

common::row_idx_t kuzu::storage::ChunkedNodeGroup::getStartRowIdx ( ) const
inline

◆ hasAnyUpdates()

bool kuzu::storage::ChunkedNodeGroup::hasAnyUpdates ( const transaction::Transaction * transaction,
common::column_id_t columnID,
common::row_idx_t startRow,
common::length_t numRows ) const

◆ hasUpdates()

bool kuzu::storage::ChunkedNodeGroup::hasUpdates ( ) const

◆ hasVersionInfo()

bool kuzu::storage::ChunkedNodeGroup::hasVersionInfo ( ) const
inline

◆ isDeleted()

bool kuzu::storage::ChunkedNodeGroup::isDeleted ( const transaction::Transaction * transaction,
common::row_idx_t rowInChunk ) const

◆ isFullOrOnDisk()

bool kuzu::storage::ChunkedNodeGroup::isFullOrOnDisk ( ) const
inline

◆ isInserted()

bool kuzu::storage::ChunkedNodeGroup::isInserted ( const transaction::Transaction * transaction,
common::row_idx_t rowInChunk ) const

◆ lookup()

bool kuzu::storage::ChunkedNodeGroup::lookup ( transaction::Transaction * transaction,
const TableScanState & state,
NodeGroupScanState & nodeGroupScanState,
common::offset_t rowIdxInChunk,
common::sel_t posInOutput ) const

◆ moveColumnChunk()

std::unique_ptr< ColumnChunk > kuzu::storage::ChunkedNodeGroup::moveColumnChunk ( const common::column_id_t columnID)
inline

◆ resetNumRowsFromChunks()

void kuzu::storage::ChunkedNodeGroup::resetNumRowsFromChunks ( )

◆ resetToAllNull()

void kuzu::storage::ChunkedNodeGroup::resetToAllNull ( ) const

◆ resetToEmpty()

void kuzu::storage::ChunkedNodeGroup::resetToEmpty ( )

◆ resetVersionAndUpdateInfo()

void kuzu::storage::ChunkedNodeGroup::resetVersionAndUpdateInfo ( )

◆ resizeChunks()

void kuzu::storage::ChunkedNodeGroup::resizeChunks ( uint64_t newSize)

◆ scan()

void kuzu::storage::ChunkedNodeGroup::scan ( const transaction::Transaction * transaction,
const TableScanState & scanState,
const NodeGroupScanState & nodeGroupScanState,
common::offset_t rowIdxInGroup,
common::length_t numRowsToScan ) const

◆ scanCommitted()

template<ResidencyState SCAN_RESIDENCY_STATE>
void kuzu::storage::ChunkedNodeGroup::scanCommitted ( transaction::Transaction * transaction,
TableScanState & scanState,
NodeGroupScanState & nodeGroupScanState,
ChunkedNodeGroup & output ) const

◆ scanUpdates()

std::pair< std::unique_ptr< ColumnChunk >, std::unique_ptr< ColumnChunk > > kuzu::storage::ChunkedNodeGroup::scanUpdates ( transaction::Transaction * transaction,
common::column_id_t columnID )

◆ serialize()

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

◆ setNumRows()

void kuzu::storage::ChunkedNodeGroup::setNumRows ( common::offset_t numRows_)

◆ setVersionInfo()

void kuzu::storage::ChunkedNodeGroup::setVersionInfo ( std::unique_ptr< VersionInfo > versionInfo)
inline

◆ update()

void kuzu::storage::ChunkedNodeGroup::update ( transaction::Transaction * transaction,
common::row_idx_t rowIdxInChunk,
common::column_id_t columnID,
const common::ValueVector & propertyVector )

◆ write()

void kuzu::storage::ChunkedNodeGroup::write ( const ChunkedNodeGroup & data,
common::column_id_t offsetColumnID )

◆ writeToColumnChunk()

virtual void kuzu::storage::ChunkedNodeGroup::writeToColumnChunk ( common::idx_t chunkIdx,
common::idx_t vectorIdx,
const std::vector< std::unique_ptr< ColumnChunk > > & data,
ColumnChunk & offsetChunk )
inlinevirtual

Member Data Documentation

◆ capacity

uint64_t kuzu::storage::ChunkedNodeGroup::capacity
protected

◆ CHUNK_CAPACITY

uint64_t kuzu::storage::ChunkedNodeGroup::CHUNK_CAPACITY = 2048
staticconstexpr

◆ chunks

std::vector<std::unique_ptr<ColumnChunk> > kuzu::storage::ChunkedNodeGroup::chunks
protected

◆ format

NodeGroupDataFormat kuzu::storage::ChunkedNodeGroup::format
protected

◆ numRows

std::atomic<common::row_idx_t> kuzu::storage::ChunkedNodeGroup::numRows
protected

◆ residencyState

ResidencyState kuzu::storage::ChunkedNodeGroup::residencyState
protected

◆ startRowIdx

common::row_idx_t kuzu::storage::ChunkedNodeGroup::startRowIdx
protected

◆ versionInfo

std::unique_ptr<VersionInfo> kuzu::storage::ChunkedNodeGroup::versionInfo
protected

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