C++ SDK Documentation  24.2.0
Vertica::VerticaBlock Class Reference

: Represents an in-memory block of tuples More...

Inheritance diagram for Vertica::VerticaBlock:
Inheritance graph
Collaboration diagram for Vertica::VerticaBlock:
Collaboration graph

Classes

struct  NestedBlockPtr
 

Public Member Functions

 VerticaBlock (size_t ncols, int rowcount, const int *indices)
 
void copy (const VerticaBlock &other)
 
template<class T >
const T * getColPtr (size_t idx) const
 
template<>
const VStringgetColPtr (size_t idx) const
 
template<>
const VNumericgetColPtr (size_t idx) const
 
template<>
const VUuidgetColPtr (size_t idx) const
 
template<>
const BlockReadergetColPtr (size_t idx) const
 
template<class T >
T * getColPtrForWrite (size_t idx)
 
template<>
VStringgetColPtrForWrite (size_t idx)
 
template<>
VNumericgetColPtrForWrite (size_t idx)
 
template<>
VUuidgetColPtrForWrite (size_t idx)
 
template<>
BlockWritergetColPtrForWrite (size_t idx)
 
template<class T >
const T & getColRef (size_t idx) const
 
template<class T >
T & getColRefForWrite (size_t idx)
 
int getColStride (size_t idx) const
 
const EE::DataAreagetDataArea (size_t idx) const
 
size_t getNumCols () const
 
int getNumRows () const
 
const SizedColumnTypesgetTypeMetaData () const
 
SizedColumnTypesgetTypeMetaData ()
 
void * getVoidPtr (size_t idx=0)
 
const void * getVoidPtr (size_t idx=0) const
 
bool remaining () const
 
virtual void resetForDataAreaFlush ()
 
void setDataArea (size_t idx, void *dataarea)
 

Protected Member Functions

void addCol (char *arg, int colstride, const Field &field)
 
void addCol (const char *arg, int colstride, const Field &field)
 
bool checkStringUserBlockInfo (size_t idx) const
 
bool checkTimeUserBlockInfo (size_t idx) const
 
EE::DataArea ** getArrayIntermediateDataArea (size_t c)
 
void reset ()
 
void resetIndex ()
 
void setRowCount (int rowCount)
 
void validateStringColumn (size_t idx, const VString &s, size_t colLength) const
 

Protected Attributes

std::vector< char * > cols
 
std::vector< int > colstrides
 
int count
 
std::vector< NestedBlockPtrctWrappers
 
int index
 
const int * indices
 
size_t ncols
 
int nrows
 
std::vector< BaseDataOID > processBlockUserInfoVector
 
std::vector< VStringsvWrappers
 
SizedColumnTypes typeMetaData
 
std::vector< VUuiduuWrappers
 
std::vector< VNumericvnWrappers
 

Friends

class ::EE::Loader::OrcParser
 
class ::EE::Loader::ParquetParser
 
class ::EE::MVExprSupport
 
class ::EE::UserDefinedAggregate
 
class ::EE::UserDefinedAnalytic
 
class ::EE::UserDefinedProcess
 
class ::EE::UserDefinedTransform
 
class ::EE::VEval
 
class AggregateFunction
 
class Array::BlockSaver
 
struct CPPExecContext
 
class VerticaBlockSerializer
 

Detailed Description

: Represents an in-memory block of tuples

Member Function Documentation

◆ addCol()

void Vertica::VerticaBlock::addCol ( char *  arg,
int  colstride,
const Field field 
)
protected

Add the location for reading a particular argument.

Parameters
argThe base location to find data.
colstrideThe stride between data instances.
fieldmetadata for the added column
dtThe type of input.
fieldnamethe name of the field

Referenced by Vertica::ParamReader::addParameter().

◆ getArrayIntermediateDataArea()

EE::DataArea** Vertica::VerticaBlock::getArrayIntermediateDataArea ( size_t  c)
inlineprotected
Returns
a pointer to a DataArea for accumulating an intermediate result

◆ getColPtr()

template<class T >
const T* Vertica::VerticaBlock::getColPtr ( size_t  idx) const
inline
Returns
a pointer to the idx'th argument, cast appropriately.

Example:

const vint *a = arg_reader->getColPtr<vint>(0);

◆ getColRef()

template<class T >
const T& Vertica::VerticaBlock::getColRef ( size_t  idx) const
inline
Returns
a pointer to the idx'th argument, cast appropriately.

Example: const vint a = arg_reader->getColRef<vint>(0);

◆ getNumCols()

size_t Vertica::VerticaBlock::getNumCols ( ) const
inline
Returns
the number of columns held by this block.

Referenced by Vertica::BlockWriter::copyFromInput(), Vertica::BlockReader::isNull(), and Vertica::BlockWriter::setNull().

◆ getNumRows()

int Vertica::VerticaBlock::getNumRows ( ) const
inline
Returns
the number of rows held by this block.

◆ getTypeMetaData() [1/2]

const SizedColumnTypes& Vertica::VerticaBlock::getTypeMetaData ( ) const
inline
Returns
information about the types and numbers of arguments

Referenced by Vertica::ParamReader::getType(), Vertica::BlockReader::isNull(), and Vertica::BlockWriter::setNull().

◆ getTypeMetaData() [2/2]

SizedColumnTypes& Vertica::VerticaBlock::getTypeMetaData ( )
inline
Returns
information about the types and numbers of arguments

◆ remaining()

bool Vertica::VerticaBlock::remaining ( ) const
inline
Returns
the number of entries remaining in the block

◆ resetForDataAreaFlush()

virtual void Vertica::VerticaBlock::resetForDataAreaFlush ( )
inlinevirtual

Virtual method to be called when the Data Area fills up in a load. Should be called from the StreamWriter class.

Reimplemented in Vertica::StreamWriter.