16.20 - Context[] Parameter - 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)

As discussed in Aggregate UDFs, the parameter list includes an array of com.teradata.fnc.Context objects.

The Context class provides methods that are useful for aggregate functions.

Method Description
initCtx() Allocates and initializes the aggregate intermediate storage area.

An aggregate UDF uses this method in the Phase.AGR_INIT phase of aggregation.

getBytes() Returns data that was stored in one of two intermediate aggregate storage areas.
getObject()
setBytes() Stores intermediate results specified by obj into the aggregate storage area.
setObject()