setObject(int objNum, 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
Language
English (United States)
Last Update
2023-07-11
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
B035-1147
lifecycle
latest
Product Category
Teradata Vantage™

Stores intermediate results specified by obj into the aggregate storage area.

Each time the UDF is called during the AGR_DETAIL aggregation phase, it must accumulate the row data passed in through arguments into the intermediate aggregate storage area for the specific group. Each group being aggregated to has a separate intermediate storage area.

Syntax

setObject(int objNum, java.lang.Object obj)

Syntax Elements

objNum
Aggregate UDFs must pass a value of 1 for the objNum argument. Other values are reserved for future releases.
obj
Intermediate results to store into the aggregate storage area.

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, setObject() throws an SQLException to indicate an overflow condition, setting the SQLException fields as follows.

SQLState Field vendorCode Field
“TS000” 7845