17.10 - getUDFOutputArray() - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

Creates a new instance of com.teradata.fnc.Array.

  • This method is supported for both 1-D and N-D arrays. However, this method is provided mainly for support of N-D arrays because the com.teradata.fnc.Array class provides some additional method signatures especially for N-D arrays. For 1-D array, it is recommended to use any generic implementation of java.sql.Array instead, since 1-D array support conforms to the JDBC standard.
  • This method is valid for scalar and aggregate UDFs only. For table UDFs and external stored procedures, you should create a new Array object via the routine’s INOUT or OUT parameters and update its attributes accordingly.
  • This method is a Teradata extension.

A new object of type com.teradata.fnc.Array.

The new com.teradata.fnc.Array object is initialized with the type information provided for the scalar or aggregate UDF’s return value.

If the array is defined as DEFAULT NULL, the new com.teradata.fnc.Array object will have all its elements initialized to NULL. Otherwise, no elements are initialized.


com.teradata.fnc.Array getUDFOutputArray()
                            throws SQLException


Throws SQLException with the following database specific code and message: 9743 (ERRUDFJAVARRAY) <Unsupported Array element type passed to getUDFOutputArray>.