On 8/10/11 12:49 PM, Eshwaran Vijaya Kumar wrote:
OK. That sounds good. By the way, the documentation doesn't say whether the following is
impossible: Suppose I have a long script and I have several of such stages where I want
the prior execution to be completed before moving on, could I have more "execs"
For example:
<Pig Stuff that needs to be run prior to exec 1>
exec;
< Pig Stuff that needs to be run prior to exec 2>
exec:
So on..
Would the presence of the first exec in the portion of the pig script prior to
the second exec affect the second exec when it is executed?
The store statements in the first section will only get executed twice.
But if you use any of the relations in the first section in the second
section, those relations will be recomputed. So that is something you
might want to avoid. Extended syntax for supporting this use case will
solve such issues with this workaround.
In example below, the inp and filt relations get computed twice.
inp = load 'x';
filt = filter inp by $0 > 0;
store filt into 'out1';
exec;
filter_more = filter filt by $1 > 0;
store filter_more into 'out2';
exec;