17.10 - Cogroup and Multiple Input Table Operators - 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)

Cogroup is a join operation where input from multiple input streams are grouped together into a huge group as long as the input satisfies the PARTITION BY condition.

For each invocation of the table operator, only the qualifying input are allowed to participate. Qualifying input is input that have the same partition key values.

The table operator is not invoked when all of the PARTITION BY ANY and PARTITION BY key inputs are empty while the DIMENSION inputs are not empty. The table operator is invoked for every partition and it can return one or more rows for every invocation.

Cogroup ensures that table operators that handle multiple input streams will return consistent results on systems with different configurations where the number of AMPs differ. This functionality is enabled by default, but you can disable cogroup by calling FNC_TblOpDisableCoGroup in the contract function. However, if cogroup is disabled, multiple input table operators may return different results on systems with different configurations.

Cogroup is not supported for table operators with an input record format set to IndicData with no row or partition separator sentinels (format attribute "RECFMT" set to INDICBUFFMT1). With this indicator buffer format, the table operator is not invoked per partition which is required by cogroup.