16.20 - Filling the newValues Buffer - 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)

After you allocate the newValues buffer, fill the buffer with the desired element value for each element in the specified range, in row-major order. For each element to be modified, fill the buffer as follows:

  1. The first 4 bytes should describe the size of the data. This is only applicable for variable-length element data types.
  2. The remaining bytes allocated for each element are allocated to hold the maximum size of the element data type. This space should contain the new element value.

Therefore, for each element, space is allocated as:

  • (MAX_SIZE_OF_ELEMENT_DATA_TYPE + 4 bytes) for variable-length element data types.
  • (MAX_SIZE_OF_ELEMENT_DATA_TYPE) for fixed-length data types.