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

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<class T >
T * getColPtrForWrite (size_t idx)
 
template<class T >
const T & getColRef (size_t idx)
 
template<class T >
T & getColRefForWrite (size_t idx)
 
int getColStride (size_t idx) const
 
const EE::DataAreagetDataArea (size_t idx)
 
size_t getNumCols () const
 
int getNumRows () const
 
const SizedColumnTypesgetTypeMetaData () const
 
SizedColumnTypesgetTypeMetaData ()
 
void * getVoidPtr ()
 
void setDataArea (size_t idx, void *dataarea)
 

Protected Member Functions

void addCol (char *arg, int colstride, const VerticaType &dt, const std::string fieldName="")
 
void addCol (const char *arg, int colstride, const VerticaType &dt, const std::string fieldName="")
 
bool checkStringUserBlockInfo (size_t idx) const
 
bool checkTimeUserBlockInfo (size_t idx) const
 
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
 
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::UserDefinedAggregate
 
class ::EE::UserDefinedAnalytic
 
class ::EE::UserDefinedProcess
 
class ::EE::UserDefinedTransform
 
class AggregateFunction
 
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 VerticaType dt,
const std::string  fieldName = "" 
)
inlineprotected

Add the location for reading a particular argument.

Parameters
argThe base location to find data.
colstrideThe stride between data instances.
dtThe type of input.
fieldnamethe name of the field
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);

Referenced by Vertica::PartitionWriter::copyFromInput().

template<class T >
const T& Vertica::VerticaBlock::getColRef ( size_t  idx)
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.
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::PartitionWriter::copyFromInput().

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