C++ SDK Documentation  23.3.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
 
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

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().

EE::DataArea** Vertica::VerticaBlock::getArrayIntermediateDataArea ( size_t  c)
inlineprotected
Returns
a pointer to a DataArea for accumulating an intermediate result
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);
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);

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().

int Vertica::VerticaBlock::getNumRows ( ) const
inline
Returns
the number of rows held by this block.
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().

SizedColumnTypes& Vertica::VerticaBlock::getTypeMetaData ( )
inline
Returns
information about the types and numbers of arguments
bool Vertica::VerticaBlock::remaining ( ) const
inline
Returns
the number of entries remaining in the block