C++ SDK Documentation
24.2.0
|
Provides an iterator-based write interface over output data for a single partition. Automatically makes space a block-at-a-time, as needed. More...
Public Member Functions | |
PartitionWriter (size_t narg) | |
PartitionWriter (size_t narg, EE::UserDefinedProcess *udx_object) | |
PartitionWriter (size_t narg, size_t nrows, EE::UserDefinedProcess *udx_object) | |
void | copy (const VerticaBlock &other) |
void | copyFromInput (size_t dstIdx, const BlockReader &input_reader, size_t srcIdx) |
void | copyFromInput (const BlockReader &input_reader) |
Array::ArrayWriter | getArrayRef (size_t idx) |
template<class T > | |
const T * | getColPtr (size_t idx) const |
template<> | |
const VString * | getColPtr (size_t idx) const |
template<> | |
const VNumeric * | getColPtr (size_t idx) const |
template<> | |
const VUuid * | getColPtr (size_t idx) const |
template<> | |
const BlockReader * | getColPtr (size_t idx) const |
template<class T > | |
T * | getColPtrForWrite (size_t idx) |
template<> | |
VString * | getColPtrForWrite (size_t idx) |
template<> | |
VNumeric * | getColPtrForWrite (size_t idx) |
template<> | |
VUuid * | getColPtrForWrite (size_t idx) |
template<> | |
BlockWriter * | getColPtrForWrite (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 |
PartitionWriterColumns | getColumns () |
const EE::DataArea * | getDataArea (size_t idx) const |
size_t | getNumCols () const |
VNumeric & | getNumericRef (size_t idx) |
int | getNumRows () const |
BlockWriter * | getRowPtr (size_t idx) |
BlockWriter & | getRowRef (size_t idx) |
Get a reference for writing an output Row value. More... | |
VString & | getStringRef (size_t idx) |
VString & | getStringRefNoClear (size_t idx) |
const SizedColumnTypes & | getTypeMetaData () const |
SizedColumnTypes & | getTypeMetaData () |
VUuid & | getUuidRef (size_t idx) |
const void * | getVoidPtr (size_t idx=0) const |
void * | getVoidPtr (size_t idx) |
virtual bool | getWriteableBlock () |
bool | next () |
bool | remaining () const |
virtual void | resetForDataAreaFlush () |
void | setBool (size_t idx, vbool r) |
void | setDataArea (size_t idx, void *dataarea) |
void | setDate (size_t idx, DateADT r) |
void | setFloat (size_t idx, vfloat r) |
void | setInt (size_t idx, vint r) |
void | setInterval (size_t idx, Interval r) |
void | setIntervalYM (size_t idx, IntervalYM r) |
void | setNull (size_t idx) |
Set the idx'th argument to null. If a column has the canBeNull attribute set to false , then this throws an exception. More... | |
void | setNull (size_t idx, bool enforceNotNullProperty) |
Set the idx'th argument to null. More... | |
void | setTime (size_t idx, TimeADT r) |
void | setTimestamp (size_t idx, Timestamp r) |
void | setTimestampTz (size_t idx, TimestampTz r) |
void | setTimeTz (size_t idx, TimeTzADT r) |
void | throwIncorrectUsageError (size_t idx) |
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 |
bool | commitPrefilledRows (int nRows) |
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 | |
union { | |
EE::UserDefinedAnalytic * udan | |
EE::UserDefinedTransform * udt | |
EE::UserDefinedProcess * udx_object | |
}; | |
std::vector< char * > | cols |
std::vector< int > | colstrides |
int | count |
std::vector< NestedBlockPtr > | ctWrappers |
int | index |
const int * | indices |
size_t | ncols |
int | nrows |
std::vector< BaseDataOID > | processBlockUserInfoVector |
int | pstart |
std::vector< VString > | svWrappers |
SizedColumnTypes | typeMetaData |
std::vector< VUuid > | uuWrappers |
std::vector< VNumeric > | vnWrappers |
Friends | |
class | EE::Loader::UserDefinedLoad |
class | EE::UserDefinedAnalytic |
class | EE::UserDefinedProcess |
class | EE::UserDefinedTransform |
class | PartitionWriterColumns |
Provides an iterator-based write interface over output data for a single partition. Automatically makes space a block-at-a-time, as needed.
|
protectedinherited |
Add the location for reading a particular argument.
arg | The base location to find data. |
colstride | The stride between data instances. |
field | metadata for the added column |
dt | The type of input. |
fieldname | the name of the field |
Referenced by Vertica::ParamReader::addParameter().
void Vertica::PartitionWriter::copyFromInput | ( | size_t | dstIdx, |
const BlockReader & | input_reader, | ||
size_t | srcIdx | ||
) |
Copies a column from the input reader to the output writer. Raises an error if the input and output data types are not compatible.
dstIdx | The destination column index (in the output writer) |
input_reader | The input reader from which to copy a column |
srcIdx | The source column index (in the input reader) |
|
inlineprotectedinherited |
|
inlineinherited |
|
inlineinherited |
Example: const vint a = arg_reader->getColRef<vint>(0);
|
inlineinherited |
Referenced by Vertica::BlockWriter::copyFromInput(), Vertica::BlockReader::isNull(), and Vertica::BlockWriter::setNull().
|
inlineinherited |
|
inline |
Get a reference for writing an output Row value.
idx | the output column |
|
inlineinherited |
Referenced by Vertica::ParamReader::getType(), Vertica::BlockReader::isNull(), and Vertica::BlockWriter::setNull().
|
inlineinherited |
|
virtual |
Gets a writeable block of data and positions cursor at the beginning.
Reimplemented in Vertica::AnalyticPartitionWriter, and Vertica::StreamWriter.
|
inlineinherited |
|
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.
|
inline |
Setter methods
|
inline |
Set the idx'th argument to null. If a column has the canBeNull
attribute set to false
, then this throws an exception.
idx | The column number in the row to set to null |
|
inline |
Set the idx'th argument to null.
idx | The column number in the row to set to null |
enforceNotNullProperty | If false, do not throw an exception if canBeNull is false . |