16.20 - FNC_GetHashAmp - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

Purpose

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

Syntax

int
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.