16.20 - Rules for Writing UDFs that Compress/Decompress TIME, TIMESTAMP, Period, ARRAY, and non-LOB UDT Data - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)

Follow these guidelines to write scalar UDFs that compress/decompress column data which have the following data types: TIME, TIMESTAMP, Period, ARRAY, or supported distinct non-LOB UDT.

  • The compress UDF should have the following signature:
    • The UDF must declare a single input parameter which has a data type of TIME, TIMESTAMP, Period, ARRAY or supported distinct non-LOB UDT.
    • The parameter data type and column data type should be the same.
    • The return type should be VARBYTE(64000).
  • The decompress UDF should have the following signature:
    • The UDF must declare a single VARBYTE(64000) input parameter.
    • The output of the decompress UDF should be identical to the column type.