17.10 - Usage Notes - Advanced SQL Engine - Teradata Database

Teradata Vantageā„¢ - Data Types and Literals

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1143-171K
Language
English (United States)

VARIANT_TYPE UDT High-Level Features

UDT Classification Structured Type UDT
UDT Type Name Variant_Type
Associated Methods (UDMs) None
Ordering Functionality Implements full map ordering. The ordering routine will return the value of the first attribute of the VARIANT_TYPE UDT.
The first attribute of the VARIANT_TYPE UDT cannot be one of the following: LOB, UDT, or LOB-UDT.
Transform Functionality None

You cannot import or export the VARIANT_TYPE UDT. You cannot use this data type in SQL statements that result with the data type being returned to the caller as output. Otherwise, you will receive an SQL error stating that no such UDT is defined.

Cast Functionality None

Maximum Number of Supported Parameters

UDFs support a maximum of 128 parameters. In addition, each VARIANT_TYPE input parameter accommodates up to 128 parameters, and you can declare up to 8 UDF input parameters to be of VARIANT_TYPE data type. This increases the number of supported UDF input parameters from 128 to 120 + (8 X 128) = 1144 input parameters per UDF.

Restrictions

  • You can specify the VARIANT_TYPE UDT as a data type of input parameters to UDFs. You cannot use them as the data type for UDF result parameters or for any other purpose.
  • You can use the VARIANT_TYPE data type only with UDFs written in C or C++. You cannot use them with SQL UDFs or UDFs written in Java.
  • All restrictions that apply to structured UDTs also apply to the VARIANT_TYPE UDT.