Contents
This document captures the specification for nested foreach support in pig and proposal for extending this support over multiple levels. This is tracked at PIG-1631.
Introduction
Pig currently supports DISTINCT, FILTER, LIMIT, CROSS and ORDER BY inside nested foreach statement and it is highly desired to have support for FOREACH nested inside a foreach.
C = foreach B {
C1 = foreach A generate ..;
...
generate group, ..;
}