You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Santhosh Srinivasan (JIRA)" <ji...@apache.org> on 2009/02/28 02:57:12 UTC

[jira] Commented: (PIG-532) Casting a field removes its alias.

    [ https://issues.apache.org/jira/browse/PIG-532?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12677622#action_12677622 ] 

Santhosh Srinivasan commented on PIG-532:
-----------------------------------------

The change is in QueryParser.jjt line number 2500

Add the following line

fs.alias = exprOp.alias;

before 

cast.setFieldSchema(fs);


> Casting a field removes its alias.
> ----------------------------------
>
>                 Key: PIG-532
>                 URL: https://issues.apache.org/jira/browse/PIG-532
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: types_branch
>            Reporter: Alan Gates
>            Priority: Minor
>             Fix For: types_branch
>
>
> Given a script like:
> {code}
> a = loader 'myfile' as (x, y);
> b = foreach a generate (int)x, (double)y;
> c = group a by x;
> {code}
> you will get an error that x is an unknown alias.  The cast operator is not carrying through the alias.  It should.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.