Query Syntax - 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

The SQL production rules for the invocation of UDSFs and UDAFs are described in this section.

User defined functions can be placed in the:

  • Select list of the SELECT clause
  • HAVING clause
  • GROUP BY clause

For both UDSF and UDAF, two styles of input arguments are provided: positional and key-value arguments. The key-value arguments, represented as clause_name(literal [, ...]) in the grammar, can only be constants (only literal in fact, the same with the SQL-MapReduce and Teradata Aster SQL-GR functions) and are evaluated at prepare time. The positional arguments, represented as expression in the grammar, can be typed and are provided to the function strictly at the execution time.

You can invoke a user defined function with parameters either by position or in the ON clause with zero or more argument clauses. A single user defined function implementation can support both methods. It is the developer's choice how the UDF is allowed to be called.