getBytes(int objNum) - 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™

Returns data that was stored in one of two intermediate aggregate storage areas.

If the specified storage area contains no data, getBytes() returns a null object.

This method is similar to Context.getObject() but provides a faster interface.

Syntax

getBytes(int objNum)

Syntax Elements

objNum
Specifies which aggregation storage area to retrieve intermediate results from, as follows:
Value Meaning
1 Retrieve intermediate results from the first aggregate storage area.

The data that the UDF retrieves was stored from a call to Context.setByte() during a previous aggregation phase. The UDF uses the previously stored data during the Phase.AGR_DETAIL, Phase.AGR_COMBINE and Phase.AGR_FINAL aggregation phases.

2 Retrieve intermediate results from the second aggregate storage area.

The data that the UDF retrieves is stored by Vantage. The UDF uses the data during the Phase.AGR_COMBINE aggregation phase.

Exceptions

If the value of objNum is out of range, getBytes() throws an SQLException to indicate that the input parameter of Context.getObject(int) is out of range, setting the SQLException fields as follows.

SQLState Field vendorCode Field
“TS000” 7844