16.20 - Differences Between Table Functions and Table Operators - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL External Routine Programming

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
April 2020
Content Type
Programming Reference
Publication ID
B035-1147-162K
Language
English (United States)
  • The inputs and outputs for table operators are a set of rows (a table) and not columns. The default format of a row is IndicData.
  • In a table function, the row iterator is outside of the function and the iterator calls the function for each input row. In the table operators, the operator writer is responsible for iterating over the input and producing the output rows for further consumption. The table operator itself is called only once. This reduces per row costs and provides more flexible read/write patterns.
  • The operator writer has the option of establishing the output characteristics via a user-defined contract function. The contract function is invoked at runtime when the table operator is being parsed. Therefore, the operator has full flexibility to determine the output from the input.
  • The table operators can use custom argument clauses to make them polymorphic.