You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by James <al...@gmail.com> on 2015/02/03 14:12:47 UTC

回复: Recursive value assignment

I meant, why Pig allows such a confused setting?




------------------ 原始邮件 ------------------
发件人: "Daniel Dai"<da...@hortonworks.com>; 
发送时间: 2015年1月31日(星期六) 凌晨2:56
收件人: "user@pig.apache.org"<us...@pig.apache.org>; 
主题: Re: Recursive value assignment



The late definition will override the previous one.

Daniel

On 1/26/15, 3:07 AM, "alcaid1801@gmail.com" <al...@gmail.com> wrote:

>Dear all, 
>
>I try the following code:
>
>```
>data = load 'xxx' as (col: String);
>data = filter data by col != '';
>out = foreach data generate col;
>```
>
>I don't know why pig allow recursive value assignment, as it would be
>confused. I might wonder which 'data' does 'out' relies.
>
>James

Re: 回复: Recursive value assignment

Posted by Daniel Dai <da...@hortonworks.com>.
I guess some people prefer to use the same alias rather than come out a
new alias name for each stage of the script, that will be a lot of names
to think about.

Daniel

On 2/3/15, 5:12 AM, "alcaid1801@gmail.com" <al...@gmail.com> wrote:

>I meant, why Pig allows such a confused setting?
>
>
>
>
>------------------ 原始邮件 ------------------
>发件人: "Daniel Dai"<da...@hortonworks.com>;
>发送时间: 2015年1月31日(星期六) 凌晨2:56
>收件人: "user@pig.apache.org"<us...@pig.apache.org>;
>主题: Re: Recursive value assignment
>
>
>
>The late definition will override the previous one.
>
>Daniel
>
>On 1/26/15, 3:07 AM, "alcaid1801@gmail.com" <al...@gmail.com> wrote:
>
>>Dear all, 
>>
>>I try the following code:
>>
>>```
>>data = load 'xxx' as (col: String);
>>data = filter data by col != '';
>>out = foreach data generate col;
>>```
>>
>>I don't know why pig allow recursive value assignment, as it would be
>>confused. I might wonder which 'data' does 'out' relies.
>>
>>James