17.10 - Filling the newValues Buffer - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
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.