16.20 - FNC_GetHashAmp - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
April 2020
Content Type
Programming Reference
Publication ID
English (United States)


Accepts data and determines the AMP which would be responsible for that key.


FNC_GetHashAmp(FNC_HashRow_t *data,
               int            size,
               int           *retCode)
FNC_HashRow_t *data
IN parameter
A pointer to an array of structures representing table columns.
FNC_HashRow_t is defined as follows:
typedef struct {
   void *data;
   parm_tx type;
} FNC_HashRow_t;
int size
IN parameter
The size of the data and return arrays.
int *retCode
OUT parameter
A pointer to an integer value to indicate success or an error number. 0 indicates success.

Return Value

An integer representing the number of the AMP that would be responsible for the key.

Usage Notes

This routine is callable on a PE vproc only by a table operator.