initCtx(int length) - Advanced SQL Engine - Teradata Database

SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Published
July 2021
Language
English (United States)
Last Update
2021-07-27
dita:mapPath
rin1593638965306.ditamap
dita:ditavalPath
rin1593638965306.ditaval
dita:id
B035-1147
lifecycle
previous
Product Category
Teradata Vantage™

Allocates and initializes the aggregate intermediate storage area according to the length specified by the length input argument.

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

Syntax

initCtx(int length)

Syntax Elements

length
Length the function uses to allocate and initialize the aggregate intermediate storage area.

Exceptions

If length is larger than the size specified in the CLASS AGGREGATE clause of the CREATE FUNCTION or REPLACE FUNCTION statement for the UDF, initCtx() throws an SQLException to indicate that aggregate storage allocation failed because requested size is too big. The SQLException fields are set to the following values.

SQLState Field vendorCode Field
“TS000” 7843