Vertica::IntermediateAggs Class Reference

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

Inheritance diagram for Vertica::IntermediateAggs:

Vertica::VerticaBlock List of all members.

Public Member Functions

vbool * getBoolPtr (size_t idx)
 Get a pointer to a BOOLEAN value from the intermediate results set.
vbool & getBoolRef (size_t idx)
 Get a reference to a BOOLEAN value from the intermediate results set.
template<class T>
const T * getColPtr (size_t idx)
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)
const EE::DataArea * getDataArea (size_t idx)
DateADT * getDatePtr (size_t idx)
 Get a pointer to a DATE value from the intermediate results set.
DateADT & getDateRef (size_t idx)
 Get a reference to a DATE value from the intermediate results set.
vfloat * getFloatPtr (size_t idx)
 Get a pointer to a FLOAT value from the intermediate results set.
vfloat & getFloatRef (size_t idx)
 Get a reference to a FLOAT value from the intermediate results set.
Interval * getIntervalPtr (size_t idx)
 Get a pointer to an INTERVAL value from the intermediate results set.
Interval & getIntervalRef (size_t idx)
 Get a reference to an INTERVAL value from the intermediate results set.
IntervalYM * getIntervalYMPtr (size_t idx)
 Get a pointer to a INTERVAL YEAR TO MONTH value from the intermediate results set.
IntervalYM & getIntervalYMRef (size_t idx)
 Get a reference to an INTERVAL YEAR TO MONTH value from the intermediate results set.
vint * getIntPtr (size_t idx)
 Get a pointer to an INTEGER value from the intermediate results set.
vint & getIntRef (size_t idx)
 Get a reference to an INTEGER value from the intermediate results set.
size_t getNumCols () const
VNumeric * getNumericPtr (size_t idx)
 Get a pointer to a VNumeric value from the intermediate results set.
VNumeric & getNumericRef (size_t idx)
 Get a reference to a VNumeric value from the intermediate results set.
int getNumRows () const
VString * getStringPtr (size_t idx)
 Get a pointer to a VString value from the intermediate results set.
VString & getStringRef (size_t idx)
 Get a reference to an VString value from the intermediate results set.
TimeADT * getTimePtr (size_t idx)
 Get a pointer to a TIME value from the intermediate results set.
TimeADT & getTimeRef (size_t idx)
 Get a reference to a TIME value from the intermediate results set.
Timestamp * getTimestampPtr (size_t idx)
 Get a pointer to a TIMESTAMP value from the intermediate results set.
Timestamp & getTimestampRef (size_t idx)
 Get a reference to a TIMESTAMP value from the intermediate results set.
TimestampTz * getTimestampTzPtr (size_t idx)
 Get a pointer to a TIMESTAMP WITH TIMEZONE value from the intermediate results set.
TimestampTz & getTimestampTzRef (size_t idx)
 Get a reference to a TIMESTAMP WITH TIMEZONE value from the intermediate results set.
TimeTzADT * getTimeTzPtr (size_t idx)
 Get a pointer to a TIME WITH TIMEZONE value from the intermediate results set.
TimeTzADT & getTimeTzRef (size_t idx)
 Get a reference to a TIME WITH TIMEZONE value from the intermediate results set.
SizedColumnTypes & getTypeMetaData ()
const SizedColumnTypes & getTypeMetaData () const
void * getVoidPtr ()
 IntermediateAggs (size_t ninter)
void setDataArea (size_t idx, void *dataarea)

Protected Member Functions

void addCol (const char *arg, int colstride, const VerticaType &dt, const std::string fieldName="")
void addCol (char *arg, int colstride, const VerticaType &dt, const std::string fieldName="")
void validateStringColumn (size_t idx, const VString &s, const VerticaType &t)
friend void::copyDataToPlanPool (VerticaBlock *block)

Protected Attributes

std::vector< char * > cols
std::vector< int > colstrides
int count
int index
const int * indices
size_t ncols
int nrows
std::vector< VString > svWrappers
SizedColumnTypes typeMetaData
std::vector< VNumeric > vnWrappers

Friends

class ::EE::UserDefinedAggregate
class ::EE::UserDefinedAnalytic
class ::EE::UserDefinedProcess
class ::EE::UserDefinedTransform
class AggregateFunction
struct CPPExecContext
class VerticaBlockSerializer

Detailed Description

: A wrapper around a single intermediate aggregate value


Member Function Documentation

void Vertica::VerticaBlock::addCol ( char *  arg,
int  colstride,
const VerticaType &  dt,
const std::string  fieldName = "" 
) [inline, protected, inherited]

Add the location for reading a particular argument.

Parameters:
arg The base location to find data.
colstride The stride between data instances.
dt The type of input.
fieldname the name of the field

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

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

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

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

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

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

template<class T>
const T* Vertica::VerticaBlock::getColPtr ( size_t  idx  )  [inline, inherited]

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  )  [inline, inherited]

Returns:
a pointer to the idx'th argument, cast appropriately.
Example: const vint a = arg_reader->getColRef<vint>(0);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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:
idx The column number to retrieve from the intermediate results set.
Example:

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

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

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

Parameters:
idx The 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);

size_t Vertica::VerticaBlock::getNumCols (  )  const [inline, inherited]

Returns:
the number of columns held by this block.

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

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

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

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

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

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

int Vertica::VerticaBlock::getNumRows (  )  const [inline, inherited]

Returns:
the number of rows held by this block.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

SizedColumnTypes& Vertica::VerticaBlock::getTypeMetaData (  )  [inline, inherited]

Returns:
information about the types and numbers of arguments

const SizedColumnTypes& Vertica::VerticaBlock::getTypeMetaData (  )  const [inline, inherited]

Returns:
information about the types and numbers of arguments