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

Xuefu Zhang commented on PIG-3250:
----------------------------------

+1

Thanks for the patch, Johnny.
                
> Pig dryrun generates wrong output in .expanded file for 
> 'SPLIT....OTHERWISE...' command
> ---------------------------------------------------------------------------------------
>
>                 Key: PIG-3250
>                 URL: https://issues.apache.org/jira/browse/PIG-3250
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.12
>            Reporter: Johnny Zhang
>            Assignee: Johnny Zhang
>         Attachments: PIG-3250.patch.txt
>
>
> step to reproduce it:
> 1. input files 'users'
> {noformat}
> 1
> 2
> 3
> 4
> 5
> {noformat}
> 2. pig script split.pig
> {noformat}
> define group_and_count (A,key) returns B {
>     SPLIT $A INTO $B IF $key<7, Y IF $key==5, Z OTHERWISE;
> }
> alpha = load '/var/lib/jenkins/users' as (f1:int);
> gamma = group_and_count (alpha, f1);
> store gamma into '/var/lib/jenkins/byuser';
> {noformat}
> 3. run command
> {noformat}
> pig -x local -r split.pig
> {noformat}
> 4. the content of split.pig.expanded
> {noformat}
> alpha = load '/var/lib/jenkins/users' as f1:int;
> SPLIT alpha INTO gamma IF f1 < 7, macro_group_and_count_Y_0 IF f1 == 
> 5OTHERWISE macro_group_and_count_Z_0;
> store gamma INTO '/var/lib/jenkins/byuser';
> {noformat}
> the line "....f1 == 5OTHERWISE macro_group_and_count_Z_0;" is wrong, it 
> should be "f1 == 5, macro_group_and_count_Z_0 OTHERWISE"

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to