Processing Method for Scalar Functions - Aster Execution Engine

Teradata Aster® Developer Guide

Product
Aster Execution Engine
Release Number
7.00.02
Published
July 2017
Language
English (United States)
Last Update
2018-04-13
dita:mapPath
xnl1494366523182.ditamap
dita:ditavalPath
Generic_no_ie_no_tempfilter.ditaval
dita:id
ffu1489104705746
lifecycle
previous
Product Category
Software

A scalar function should implement the processing method computeValue, in addition to those related to custom context, in the following structure:

struct UdfScalarFunctionPointers
{
   void* customContext;
   void (*releaseCustomContext)(
      void* customContext
   );

   SqlmrErrorH (*computeValue)(
      SqlmrTaskContextH taskContext,
      void* customContext,
      SqlmrRowViewH input,
      SqlmrValueHolderH outValueHolder
   ) SQLMR_ERROR_RESULT;
};

The following table describes the member variables or methods used in the structure above:

Member Variables or Methods
Member Name Type Description
customContext variable Points to a space that stores value for the argument clauses to the scalar function, or information about input data type.
releaseCustomContext method Releases the custom context once the task is complete.
computeValue method Performs processing on the given row and emits the result.