Autogenerated Functionality for an ARRAY Data Type | Teradata Vantage - Autogenerated Functionality for an ARRAY Data Type - Advanced SQL Engine - Teradata Database

SQL Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
tpf1598412463935.ditamap
dita:ditavalPath
tpf1598412463935.ditaval
dita:id
B035-1143
lifecycle
previous
Product Category
Teradata Vantage™

Vantage automatically generates the following routines for each ARRAY data type you create.

Autogenerated Routine Description
Constructor function Allocates an ARRAY type instance and sets all the elements to an uninitialized state if the DEFAULT NULL clause was not specified. If DEFAULT NULL was specified, all elements are set to null.
Constructor method Takes one or more arguments and initializes each element of the array with the corresponding value passed to the method.

Use the ARRAY constructor expression to create a new instance of an ARRAY data type and initialize it using the autogenerated constructor method or function. For more information about the ARRAY constructor expression, see Teradata Vantage™ - SQL Functions, Expressions, and Predicates, B035-1145.

Vantage automatically generates the following functionality for each ARRAY data type you create.

Autogenerated Functionality Description
ARRAY type transform from-sql and to-sql functionality associated with the transform of an ARRAY type. The ARRAY values are transformed to/from a VARCHAR(length) value, where length depends on the element type and the total number of elements defined in the ARRAY.

For detailed information about transform input/output strings for ARRAY types, see External Representations for UDTs

.
ARRAY type ordering Basic ordering functionality for an ARRAY type.
ARRAY type cast Casting functionality for an ARRAY type. Two autogenerated casts are provided: VARCHAR to ARRAY, and ARRAY to VARCHAR.

For more information, see CREATE TYPE (ARRAY Form) in Teradata Vantage™ - SQL Data Definition Language Syntax and Examples, B035-1144.