Kùzu C++ API
Loading...
Searching...
No Matches
kuzu::common::ValueVector Class Reference

#include <value_vector.h>

Public Member Functions

 ValueVector (LogicalType dataType, storage::MemoryManager *memoryManager=nullptr)
 
 ValueVector (LogicalTypeID dataTypeID, storage::MemoryManager *memoryManager=nullptr)
 
 ~ValueVector ()=default
 
void setState (const std::shared_ptr< DataChunkState > &state_)
 
void setAllNull ()
 
void setAllNonNull ()
 
bool hasNoNullsGuarantee () const
 
void setNullRange (uint32_t startPos, uint32_t len, bool value)
 
const NullMaskgetNullMask () const
 
void setNull (uint32_t pos, bool isNull)
 
uint8_t isNull (uint32_t pos) const
 
void setAsSingleNullEntry ()
 
bool setNullFromBits (const uint64_t *srcNullEntries, uint64_t srcOffset, uint64_t dstOffset, uint64_t numBitsToCopy, bool invert=false)
 
uint32_t getNumBytesPerValue () const
 
template<typename T >
const T & getValue (uint32_t pos) const
 
template<typename T >
T & getValue (uint32_t pos)
 
template<typename T >
void setValue (uint32_t pos, T val)
 
void copyFromRowData (uint32_t pos, const uint8_t *rowData)
 
void copyToRowData (uint32_t pos, uint8_t *rowData, InMemOverflowBuffer *rowOverflowBuffer) const
 
void copyFromVectorData (uint8_t *dstData, const ValueVector *srcVector, const uint8_t *srcVectorData)
 
void copyFromVectorData (uint64_t dstPos, const ValueVector *srcVector, uint64_t srcPos)
 
void copyFromValue (uint64_t pos, const Value &value)
 
std::unique_ptr< ValuegetAsValue (uint64_t pos) const
 
uint8_t * getData () const
 
offset_t readNodeOffset (uint32_t pos) const
 
void resetAuxiliaryBuffer ()
 
void serialize (Serializer &ser) const
 

Static Public Member Functions

static bool discardNull (ValueVector &vector)
 
static std::unique_ptr< ValueVectordeSerialize (Deserializer &deSer, storage::MemoryManager *mm, std::shared_ptr< DataChunkState > dataChunkState)
 

Public Attributes

LogicalType dataType
 
std::shared_ptr< DataChunkStatestate
 

Friends

class ListVector
 
class ListAuxiliaryBuffer
 
class StructVector
 
class StringVector
 
class ArrowColumnVector
 

Detailed Description

A Vector represents values of the same data type. The capacity of a ValueVector is either 1 (sequence) or DEFAULT_VECTOR_CAPACITY.

Constructor & Destructor Documentation

◆ ValueVector() [1/2]

kuzu::common::ValueVector::ValueVector ( LogicalType dataType,
storage::MemoryManager * memoryManager = nullptr )
explicit

◆ ValueVector() [2/2]

kuzu::common::ValueVector::ValueVector ( LogicalTypeID dataTypeID,
storage::MemoryManager * memoryManager = nullptr )
inlineexplicit

◆ ~ValueVector()

kuzu::common::ValueVector::~ValueVector ( )
default

Member Function Documentation

◆ copyFromRowData()

void kuzu::common::ValueVector::copyFromRowData ( uint32_t pos,
const uint8_t * rowData )

◆ copyFromValue()

void kuzu::common::ValueVector::copyFromValue ( uint64_t pos,
const Value & value )

◆ copyFromVectorData() [1/2]

void kuzu::common::ValueVector::copyFromVectorData ( uint64_t dstPos,
const ValueVector * srcVector,
uint64_t srcPos )

◆ copyFromVectorData() [2/2]

void kuzu::common::ValueVector::copyFromVectorData ( uint8_t * dstData,
const ValueVector * srcVector,
const uint8_t * srcVectorData )

◆ copyToRowData()

void kuzu::common::ValueVector::copyToRowData ( uint32_t pos,
uint8_t * rowData,
InMemOverflowBuffer * rowOverflowBuffer ) const

◆ deSerialize()

static std::unique_ptr< ValueVector > kuzu::common::ValueVector::deSerialize ( Deserializer & deSer,
storage::MemoryManager * mm,
std::shared_ptr< DataChunkState > dataChunkState )
static

◆ discardNull()

static bool kuzu::common::ValueVector::discardNull ( ValueVector & vector)
static

◆ getAsValue()

std::unique_ptr< Value > kuzu::common::ValueVector::getAsValue ( uint64_t pos) const

◆ getData()

uint8_t * kuzu::common::ValueVector::getData ( ) const
inline

◆ getNullMask()

const NullMask & kuzu::common::ValueVector::getNullMask ( ) const
inline

◆ getNumBytesPerValue()

uint32_t kuzu::common::ValueVector::getNumBytesPerValue ( ) const
inline

◆ getValue() [1/2]

template<typename T >
T & kuzu::common::ValueVector::getValue ( uint32_t pos)
inline

◆ getValue() [2/2]

template<typename T >
const T & kuzu::common::ValueVector::getValue ( uint32_t pos) const
inline

◆ hasNoNullsGuarantee()

bool kuzu::common::ValueVector::hasNoNullsGuarantee ( ) const
inline

◆ isNull()

uint8_t kuzu::common::ValueVector::isNull ( uint32_t pos) const
inline

◆ readNodeOffset()

offset_t kuzu::common::ValueVector::readNodeOffset ( uint32_t pos) const
inline

◆ resetAuxiliaryBuffer()

void kuzu::common::ValueVector::resetAuxiliaryBuffer ( )

◆ serialize()

void kuzu::common::ValueVector::serialize ( Serializer & ser) const

◆ setAllNonNull()

void kuzu::common::ValueVector::setAllNonNull ( )
inline

◆ setAllNull()

void kuzu::common::ValueVector::setAllNull ( )
inline

◆ setAsSingleNullEntry()

void kuzu::common::ValueVector::setAsSingleNullEntry ( )
inline

◆ setNull()

void kuzu::common::ValueVector::setNull ( uint32_t pos,
bool isNull )

◆ setNullFromBits()

bool kuzu::common::ValueVector::setNullFromBits ( const uint64_t * srcNullEntries,
uint64_t srcOffset,
uint64_t dstOffset,
uint64_t numBitsToCopy,
bool invert = false )

◆ setNullRange()

void kuzu::common::ValueVector::setNullRange ( uint32_t startPos,
uint32_t len,
bool value )
inline

◆ setState()

void kuzu::common::ValueVector::setState ( const std::shared_ptr< DataChunkState > & state_)

◆ setValue()

template<typename T >
void kuzu::common::ValueVector::setValue ( uint32_t pos,
T val )

Friends And Related Symbol Documentation

◆ ArrowColumnVector

friend class ArrowColumnVector
friend

◆ ListAuxiliaryBuffer

friend class ListAuxiliaryBuffer
friend

◆ ListVector

friend class ListVector
friend

◆ StringVector

friend class StringVector
friend

◆ StructVector

friend class StructVector
friend

Member Data Documentation

◆ dataType

LogicalType kuzu::common::ValueVector::dataType

◆ state

std::shared_ptr<DataChunkState> kuzu::common::ValueVector::state

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