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.