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

A wrapper around a single intermediate aggregate value. More...

Inheritance diagram for Vertica::IntermediateAggs:
Inheritance graph
Collaboration diagram for Vertica::IntermediateAggs:
Collaboration graph

Public Member Functions

 IntermediateAggs (size_t ninter)
 
void copy (const VerticaBlock &other)
 
vboolgetBoolPtr (size_t idx)
 Get a pointer to a BOOLEAN value from the intermediate results set. More...
 
vboolgetBoolRef (size_t idx)
 Get a reference to a BOOLEAN value from the intermediate results set. More...
 
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
 
DateADTgetDatePtr (size_t idx)
 Get a pointer to a DATE value from the intermediate results set. More...
 
DateADTgetDateRef (size_t idx)
 Get a reference to a DATE value from the intermediate results set. More...
 
vfloatgetFloatPtr (size_t idx)
 Get a pointer to a FLOAT value from the intermediate results set. More...
 
vfloatgetFloatRef (size_t idx)
 Get a reference to a FLOAT value from the intermediate results set. More...
 
IntervalgetIntervalPtr (size_t idx)
 Get a pointer to an INTERVAL value from the intermediate results set. More...
 
IntervalgetIntervalRef (size_t idx)
 Get a reference to an INTERVAL value from the intermediate results set. More...
 
IntervalYMgetIntervalYMPtr (size_t idx)
 Get a pointer to a INTERVAL YEAR TO MONTH value from the intermediate results set. More...
 
IntervalYMgetIntervalYMRef (size_t idx)
 Get a reference to an INTERVAL YEAR TO MONTH value from the intermediate results set. More...
 
vintgetIntPtr (size_t idx)
 Get a pointer to an INTEGER value from the intermediate results set. More...
 
vintgetIntRef (size_t idx)
 Get a reference to an INTEGER value from the intermediate results set. More...
 
size_t getNumCols () const
 
VNumericgetNumericPtr (size_t idx)
 Get a pointer to a VNumeric value from the intermediate results set. More...
 
VNumericgetNumericRef (size_t idx)
 Get a reference to a VNumeric value from the intermediate results set. More...
 
int getNumRows () const
 
VStringgetStringPtr (size_t idx)
 Get a pointer to a VString value from the intermediate results set. More...
 
VStringgetStringRef (size_t idx)
 Get a reference to an VString value from the intermediate results set. More...
 
TimeADTgetTimePtr (size_t idx)
 Get a pointer to a TIME value from the intermediate results set. More...
 
TimeADTgetTimeRef (size_t idx)
 Get a reference to a TIME value from the intermediate results set. More...
 
TimestampgetTimestampPtr (size_t idx)
 Get a pointer to a TIMESTAMP value from the intermediate results set. More...
 
TimestampgetTimestampRef (size_t idx)
 Get a reference to a TIMESTAMP value from the intermediate results set. More...
 
TimestampTzgetTimestampTzPtr (size_t idx)
 Get a pointer to a TIMESTAMP WITH TIMEZONE value from the intermediate results set. More...
 
TimestampTzgetTimestampTzRef (size_t idx)
 Get a reference to a TIMESTAMP WITH TIMEZONE value from the intermediate results set. More...
 
TimeTzADTgetTimeTzPtr (size_t idx)
 Get a pointer to a TIME WITH TIMEZONE value from the intermediate results set. More...
 
TimeTzADTgetTimeTzRef (size_t idx)
 Get a reference to a TIME WITH TIMEZONE value from the intermediate results set. More...
 
const SizedColumnTypesgetTypeMetaData () const
 
SizedColumnTypesgetTypeMetaData ()
 
VUuidgetUuidPtr (size_t idx)
 Get a pointer to a VUuid value from the intermediate results set. More...
 
VUuidgetUuidRef (size_t idx)
 Get a reference to a VUuid value from the intermediate results set. More...
 
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
 

Detailed Description

A wrapper around a single intermediate aggregate value.

Member Function Documentation

◆ addCol()

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

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)
inlineprotectedinherited
Returns
a pointer to a DataArea for accumulating an intermediate result

◆ getBoolPtr()

vbool* Vertica::IntermediateAggs::getBoolPtr ( size_t  idx)
inline

Get a pointer to a BOOLEAN value from the intermediate results set.

Parameters
idxThe column number in the intermediate results set to retrieve.
Returns
A pointer to the retrieved value cast as a BOOLEAN.

Referenced by getBoolRef().

◆ getBoolRef()

vbool& Vertica::IntermediateAggs::getBoolRef ( size_t  idx)
inline

Get a reference to a BOOLEAN value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as an BOOLEAN.

◆ getColPtr()

template<class T >
const T* Vertica::VerticaBlock::getColPtr ( size_t  idx) const
inlineinherited
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
inlineinherited
Returns
a pointer to the idx'th argument, cast appropriately.

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

◆ getDatePtr()

DateADT* Vertica::IntermediateAggs::getDatePtr ( size_t  idx)
inline

Get a pointer to a DATE value from the intermediate results set.

Parameters
idxThe column number in the intermediate results set to retrieve.
Returns
A pointer to the retrieved value cast as a DATE.

Referenced by getDateRef().

◆ getDateRef()

DateADT& Vertica::IntermediateAggs::getDateRef ( size_t  idx)
inline

Get a reference to a DATE value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as an DATE.

◆ getFloatPtr()

vfloat* Vertica::IntermediateAggs::getFloatPtr ( size_t  idx)
inline

Get a pointer to a FLOAT value from the intermediate results set.

Parameters
idxThe column number in the intermediate results set to retrieve.
Returns
A pointer to the retrieved value cast as a FLOAT.

Referenced by getFloatRef().

◆ getFloatRef()

vfloat& Vertica::IntermediateAggs::getFloatRef ( size_t  idx)
inline

Get a reference to a FLOAT value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
A reference to the idx'th argument, cast as an FLOAT.

◆ getIntervalPtr()

Interval* Vertica::IntermediateAggs::getIntervalPtr ( size_t  idx)
inline

Get a pointer to an INTERVAL value from the intermediate results set.

Parameters
idxThe column number in the intermediate results set to retrieve.
Returns
A pointer to the retrieved value cast as an INTERVAL.

Referenced by getIntervalRef().

◆ getIntervalRef()

Interval& Vertica::IntermediateAggs::getIntervalRef ( size_t  idx)
inline

Get a reference to an INTERVAL value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as an INTERVAL.

◆ getIntervalYMPtr()

IntervalYM* Vertica::IntermediateAggs::getIntervalYMPtr ( size_t  idx)
inline

Get a pointer to a INTERVAL YEAR TO MONTH value from the intermediate results set.

Parameters
idxThe column number in the intermediate results set to retrieve.
Returns
A point to the retrieved value cast as a INTERVAL YEAR TO MONTH.

Referenced by getIntervalYMRef().

◆ getIntervalYMRef()

IntervalYM& Vertica::IntermediateAggs::getIntervalYMRef ( size_t  idx)
inline

Get a reference to an INTERVAL YEAR TO MONTH value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as an INTERVAL YEAR TO MONTH.

◆ getIntPtr()

vint* Vertica::IntermediateAggs::getIntPtr ( size_t  idx)
inline

Get a pointer to an INTEGER value from the intermediate results set.

Returns
a pointer to the idx'th argument, cast appropriately.
Parameters
idxThe column number to retrieve from the intermediate results set.

Example:

vint *a = arg_reader->getIntPtr(0);

Referenced by getIntRef().

◆ getIntRef()

vint& Vertica::IntermediateAggs::getIntRef ( size_t  idx)
inline

Get a reference to an INTEGER value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as an INTEGER.

Example:

vint a = arg_reader->getIntRef(0);

◆ getNumCols()

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

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

◆ getNumericPtr()

VNumeric* Vertica::IntermediateAggs::getNumericPtr ( size_t  idx)
inline

Get a pointer to a VNumeric value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
A pointer to the retrieved value cast as a Numeric.

Referenced by getNumericRef().

◆ getNumericRef()

VNumeric& Vertica::IntermediateAggs::getNumericRef ( size_t  idx)
inline

Get a reference to a VNumeric value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as an VNumeric.

◆ getNumRows()

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

◆ getStringPtr()

VString* Vertica::IntermediateAggs::getStringPtr ( size_t  idx)
inline

Get a pointer to a VString value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
A pointer to the retrieved value cast as a VString.

Referenced by getStringRef().

◆ getStringRef()

VString& Vertica::IntermediateAggs::getStringRef ( size_t  idx)
inline

Get a reference to an VString value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as an VString.

◆ getTimePtr()

TimeADT* Vertica::IntermediateAggs::getTimePtr ( size_t  idx)
inline

Get a pointer to a TIME value from the intermediate results set.

Parameters
idxThe column number in the intermediate results set to retrieve.
Returns
A pointer to the retrieved value cast as a TIME.

Referenced by getTimeRef().

◆ getTimeRef()

TimeADT& Vertica::IntermediateAggs::getTimeRef ( size_t  idx)
inline

Get a reference to a TIME value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as a TIME.

◆ getTimestampPtr()

Timestamp* Vertica::IntermediateAggs::getTimestampPtr ( size_t  idx)
inline

Get a pointer to a TIMESTAMP value from the intermediate results set.

Parameters
idxThe column number in the intermediate results set to retrieve.
Returns
A pointer to the retrieved value cast as a TIMESTAMP.

Referenced by getTimestampRef().

◆ getTimestampRef()

Timestamp& Vertica::IntermediateAggs::getTimestampRef ( size_t  idx)
inline

Get a reference to a TIMESTAMP value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as a TIMESTAMP.

◆ getTimestampTzPtr()

TimestampTz* Vertica::IntermediateAggs::getTimestampTzPtr ( size_t  idx)
inline

Get a pointer to a TIMESTAMP WITH TIMEZONE value from the intermediate results set.

Parameters
idxThe column number in the intermediate results set to retrieve.
Returns
A pointer to the retrieved value cast as a TIMESTAMP WITH TIMEZONE .

Referenced by getTimestampTzRef().

◆ getTimestampTzRef()

TimestampTz& Vertica::IntermediateAggs::getTimestampTzRef ( size_t  idx)
inline

Get a reference to a TIMESTAMP WITH TIMEZONE value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as a TIMESTAMP WITH TIMEZONE.

◆ getTimeTzPtr()

TimeTzADT* Vertica::IntermediateAggs::getTimeTzPtr ( size_t  idx)
inline

Get a pointer to a TIME WITH TIMEZONE value from the intermediate results set.

Parameters
idxThe column number in the intermediate results set to retrieve.
Returns
A pointer to the retrieved value cast as a TIME WITH TIMEZONE.

Referenced by getTimeTzRef().

◆ getTimeTzRef()

TimeTzADT& Vertica::IntermediateAggs::getTimeTzRef ( size_t  idx)
inline

Get a reference to a TIME WITH TIMEZONE value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as a TIME WITH TIMEZONE.

◆ getTypeMetaData() [1/2]

const SizedColumnTypes& Vertica::VerticaBlock::getTypeMetaData ( ) const
inlineinherited
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 ( )
inlineinherited
Returns
information about the types and numbers of arguments

◆ getUuidPtr()

VUuid* Vertica::IntermediateAggs::getUuidPtr ( size_t  idx)
inline

Get a pointer to a VUuid value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
A pointer to the retrieved value cast as a VUuid.

Referenced by getUuidRef().

◆ getUuidRef()

VUuid& Vertica::IntermediateAggs::getUuidRef ( size_t  idx)
inline

Get a reference to a VUuid value from the intermediate results set.

Parameters
idxThe column number to retrieve from the intermediate results set.
Returns
a reference to the idx'th argument, cast as an VUuid.

◆ remaining()

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

◆ resetForDataAreaFlush()

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

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.