Array Data Types - Teradata VantageCloud Lake

Lake - Database Reference

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
ohi1683672393549.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
ohi1683672393549

The definition of an ARRAY/VARRAY determines its storage size.

Field Description Size (bytes)
Flag bits Used to configure the layout of the field.

Bit 0: variable offset size.

  • If 0, the variable offsets are 2 bytes each.
  • If 1, the variable offsets are 4 bytes each.

Bits 1 - 15: unused

2
Last present element Index of the last present element in the array. This consists of 1 to number_of_dimensions integer values, one for each dimension.

The index values are 0-based.

If the array has uninitialized elements, the index values are equal to -1.

4 x number_of_dimensions
Presence bit array Presence bit array for the array elements.

A variable length byte array with 1 bit per element laid out in row major order.

0 means the element is null.

1 means the element is not null.



Variable offset array
  • If the element type is a variable length type, an offset array is used to index into the element data.

    The offset array is the same as the offset array in the table row.

  • If the element type is fixed length, the variable offset array is omitted.
2 x number_of_elements

or

4 x number_of_elements

Element value array All elements are stored in row major order.

Variable length elements are stored in their actual size.

number_of_elements x element_size