Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: f5d3605e62
Fetching contributors…

Cannot retrieve contributors at this time

15 lines (13 sloc) 0.38 kb
-- == foreach_generate
A = LOAD 'input/pig/foreach/A'
AS (f0:chararray, f1:chararray, f2:int);
-- vv foreach_generate
DUMP A;
B = FOREACH A GENERATE $0, $2+1, 'Constant';
DUMP B;
-- ^^ foreach_generate
DESCRIBE B;
C = FOREACH A GENERATE $0, (int) $2 AS f1, 'Constant' AS f2;
DUMP C;
DESCRIBE C;
-- C = FOREACH A GENERATE $0, (int) $2 AS f1, 'Constant' AS f2, ($2 > 3 ? 1 : 0);
Jump to Line
Something went wrong with that request. Please try again.