Array Data Types - Teradata Vantage - Analytics Database

Database Design

Deployment
VantageCloud
VantageCore
Edition
VMware
Enterprise
IntelliFlex
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
ogg1628096130566.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
zqc1472244571611
lifecycle
lifecycle
Product Category
Teradata Vantageā„¢

The storage size of an ARRAY/VARRAY depends on how it is defined.

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.


Presence bit array

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