This project has retired. For details please refer to its Attic page.
tmudr: tmudr::PartitionInfo Class Reference

tmudr::PartitionInfo Class Reference

Partitioning key of an input table or result table. More...

#include <sqludr.h>

Public Types

enum  PartitionTypeCode {
  UNKNOWN, ANY, SERIAL, PARTITION,
  REPLICATE
}

Public Member Functions

 PartitionInfo ()
PartitionTypeCode getType () const
int getNumEntries () const
int getColumnNum (int i) const
void setType (PartitionTypeCode type)
void addEntry (int colNum)
void clear ()

Detailed Description

Partitioning key of an input table or result table.

Describes the partitioning key of a table-valued input or result. When executing a UDR in parallel, if a table is partitioned on some columns, e.g. (a,b), this means that a rows with particular values for (a,b), e.g. (10, 20) will all go to the same parallel instance and will be seen as a contiguous group. This is similar to the key of a reducer in MapReduce, except that in this case we process a group of rows with the same key, not a single key and a list of values.


Member Enumeration Documentation

Type of partitioning

Enumerator:
UNKNOWN 

Partitioning type not yet determined.

ANY 

No limitations on parallel execution, typical for mappers, any row can be evaluated by any parallel instance of the UDF.

SERIAL 

No partitioning is allowed, execute serially in a single instance.

PARTITION 

Allow parallelism with partitioning key, if specified, serial execution otherwise.

REPLICATE 

Replicate the data to each parallel instance.


Constructor & Destructor Documentation

PartitionInfo::PartitionInfo (  ) 

Default constructor

Use this constructor to generate an object to be passed to UDRInvocationInfo::setChildPartitioning().


Member Function Documentation

void PartitionInfo::addEntry ( int  colNum  ) 

Add a new column to the list of partitioning columns

Add a new column to the list of column numbers that form the partitioning key. Use this only if the type of the partitioning is set to PARTITION.

Parameters:
colNum Number of the column (ordinal, 0-based) of the associated table.
Exceptions:
UDRException 
void PartitionInfo::clear (  ) 

Clear the contents of the object

int PartitionInfo::getColumnNum ( int  i  )  const

Get the number/ordinal of the ith partitioning column.

Returns:
Number/ordinal (0-based) of the ith partitioning column in the list of partitioning columns.
Exceptions:
UDRException 
int PartitionInfo::getNumEntries (  )  const

Get the number of columns that form the partitioning key

Returns the number of columns in the list of partitioning keys or zero if there are no such columns.

Returns:
Number of partitioning key columns (could be zero)
PartitionInfo::PartitionTypeCode PartitionInfo::getType (  )  const

Get the partitioning type.

Returns:
Partition type enum.
void PartitionInfo::setType ( PartitionTypeCode  type  ) 

Set the partitioning type.

Parameters:
type Partition type enum.

The documentation for this class was generated from the following files:
 All Data Structures Functions Enumerations Enumerator

Generated on 31 Aug 2016 for tmudr by  doxygen 1.6.1