FNC_GetHashAmp Function | C Library Functions | Teradata Vantage - FNC_GetHashAmp - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-24
dita:mapPath
qwr1571437338192.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

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.