16.20 - Autogenerated Functionality for an ARRAY Data Type - Teradata Vantage NewSQL Engine

Teradata Vantage™ Data Types and Literals

Teradata Database
Teradata Vantage NewSQL Engine
March 2019
Programming Reference

Teradata Database 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 details about the ARRAY constructor expression, see “ARRAY Functions and Operators” in Teradata Vantage™ SQL Functions, Expressions, and Predicates, B035-1145.

Teradata Database 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 detailed information, see “CREATE TYPE (ARRAY Form)” in Teradata Vantage™ SQL Data Definition Language Syntax and Examples, B035-1144.