The GSOC project adds support for a foreach inside a nested-foreach block. https://issues.apache.org/jira/browse/PIG-2150 . It should be part of 0.10 .

But group inside foreach is not supported yet.

-Thejas


On 8/17/11 9:02 AM, Jonathan Coveney wrote:
I believe there is someone doing google summer of code on this very issue.

2011/8/16 唐亮<[email protected]>

Hi group,
Can I use a nested group in foreach?

For example:

A = load data ... as (a1:..., a2:..., a3:..., ...)
B = group A by a1;

C = foreach B {
  * inner_group = group A by a2;*
  generate group, inner_group;
}

As the emphasized sentence,
can I group the inner bag again from relation B?

But the compiler complained 'group' is an invalid alias in 'inner_group' of
relation C.

So, can I or how can I use a nested group in foreach?

Thanks!!



Reply via email to