17.10 - SQL Definition - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1147-171K
Language
English (United States)

Here is an SQL UDF definition for the Java method that represents intermediate aggregate results as a byte array.

CREATE FUNCTION STD_DEV_BYTE(x FLOAT)
    RETURNS FLOAT
    CLASS AGGREGATE(24)
    LANGUAGE JAVA
    NO SQL
    PARAMETER STYLE JAVA
    EXTERNAL NAME 'StdDev_JAR:UDFExample.fastSTD_DEV(double)
       returns java.lang.Double';

Here is an SQL UDF definition for the Java method that represents intermediate aggregate results as an object.

CREATE FUNCTION STD_DEV_OBJ(x FLOAT)
    RETURNS FLOAT
    CLASS AGGREGATE(79)
    LANGUAGE JAVA
    NO SQL
    PARAMETER STYLE JAVA
    EXTERNAL NAME 'StdDev_JAR:UDFExample.STD_DEV(double)
       returns java.lang.Double';