Preeti Gupta 2013-03-04, 23:50
Using FILTER or not depends on your requirements and has nothing to do with
SUM or AVG.
SUM, AVG accept bags as input, so as long as you are able to provide that
it should be fine. (Though its very common that users use GROUP BY to
rollup on a key before using these UDFs).
grunt> cat data
grunt> A = load 'data';
grunt> B = foreach A generate TOBAG($0, $1) as bagg;
grunt> dump B;
grunt> C = foreach B generate AVG(bagg);
grunt> dump C;
On Mon, Mar 4, 2013 at 3:50 PM, Preeti Gupta <[EMAIL PROTECTED]>wrote:
> Can I compute SUM or AVG without using GROUPBY OR FILTER?
Preeti Gupta 2013-03-05, 04:36
Jonathan Coveney 2013-03-05, 11:14
Preeti Gupta 2013-03-05, 15:10
Eli Finkelshteyn 2013-03-05, 02:11
Jonathan Coveney 2013-03-05, 22:06