initCtx(java.lang.Object obj) - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
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™

Allocates and initializes the aggregate intermediate storage area according to the serialized size of the obj input argument.

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

Syntax

initCtx(java.lang.Object obj)

Syntax Elements

obj
Object whose serialized size the function uses to allocate and initialize the aggregate intermediate storage area.
If the input parameter obj has object type fields, the UDF must initialize those fields to non-null values before calling initCtx(). If obj has array type fields, the UDF must initialize the array itself and each array element to non-null values before calling initCtx().

Exceptions

If the serialized size of obj 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