Functions That Implement Functionality for a UDT | Teradata Vantage - Functions That Implement Functionality for a UDT - Teradata Vantage - Analytics Database

SQL External Routine Programming

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-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
Teradata Vantageā„¢

C/C++ functions that provide cast, ordering, or transform functionality for a UDT must satisfy certain requirements.

UDT Type What Function Provides What Function Must Do
Structured Cast functionality from another UDT or predefined type to UDT Set attribute values of UDT result using value of input argument.
Cast functionality from UDT to another UDT or predefined type Set value of result using attribute values of UDT input argument.
Transform functionality for importing UDT to server Transform value of predefined type input argument into attribute values of UDT result.
Transform functionality for exporting UDT from server Transform attribute values of UDT into appropriate values for predefined type result.
Ordering functionality for comparing two UDTs Use attribute values of UDT to set result to value that Vantage uses for comparisons.
Distinct Cast functionality from another UDT or predefined type to UDT Set value of UDT result using value of input argument.
Cast functionality from UDT to another UDT or predefined type Set value of result using value of UDT input argument.
Transform functionality for exporting UDT from server Transform value of predefined type input argument in value of UDT result.
Transform functionality for exporting UDT from server Transform value of UDT into appropriate value for predefined type result.
Ordering functionality for comparing two UDTs Use value of UDT to set result to value that Vantage uses for comparisons.

Vantage automatically generates cast functionality between a distinct type and its predefined source type. You can create additional functions for casting between a distinct type and other predefined data types or UDTs.

Although Vantage automatically generates transform and ordering functionality when you create a distinct type, you can drop the functionality and provide your own. Note that Vantage does not automatically generate ordering functionality for distinct UDTs where the source data type is a LOB.