Pig, mail # user - Re: Problem in understanding UDF COUNT - 2014-07-22, 12:00
 Search Hadoop and all its subprojects:

Switch to Threaded View
Copy link to this message
Re: Problem in understanding UDF COUNT
That is confusing and that is something that William Dowling explained an
email blow.

The scope of the alias b has changed. Now when used with 'for each' on c,
the alias/variable b will be used just to count what belongs to the current

Imagine that b although is a bag of all the records but when passed to the
count function in 'for each c', only those items/records are filtered or
counted which belong to the current c.

Take a look at this link that I sent earlier (especially the age_counts

It does not explain everything but it is a more detailed example with
comments and perhaps would help you to understand this Pig specific concept.

On Tue, Jul 22, 2014 at 12:07 AM, Ashish Dobhal <[EMAIL PROTECTED]>
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB