[ 
https://issues.apache.org/jira/browse/PIG-2968?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Koji Noguchi updated PIG-2968:
------------------------------

    Attachment: pig-2968-trunk_v03.txt

bq. Actually, can you please fix the indentation of testPruneSubTreeForEach() 
using 4 spaces?

Changed. (Sorry, I recently learned it's 4 spaces instead of 2.)

bq. Or at least some Assert? 

Added a catch and fail call.


bq. Should we take a crack at this before committing this

I tried simply taking out the lines but nested foreach with pruned inputs were 
different from a simple foreach with just one output. (one extra foreach on 
former)

                
> ColumnMapKeyPrune fails to prune a subtree inside foreach
> ---------------------------------------------------------
>
>                 Key: PIG-2968
>                 URL: https://issues.apache.org/jira/browse/PIG-2968
>             Project: Pig
>          Issue Type: Bug
>          Components: parser
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>            Priority: Minor
>             Fix For: 0.11
>
>         Attachments: pig-2968-trunk_v01.txt, pig-2968-trunk_v02.txt, 
> pig-2968-trunk_v03.txt
>
>
> Sample code 
> {noformat}
> $ cat test/foreach.pig 
> daily = load 'nyse' as (exchange, symbol);
> grpd = group daily by exchange;
> uniquecnt = foreach grpd {
>         sym = daily.symbol;
>         uniq_sym = distinct sym;
>         generate group, uniq_sym;
> };
> another = FOREACH uniquecnt GENERATE group;
> explain another;
> {noformat}
> This breaks when it tries to prune uniq_sym->sym->innerload_daily
> bq. 2012-10-12 14:54:11,031 [main] ERROR org.apache.pig.tools.grunt.Grunt - 
> ERROR 2000: Error processing rule ColumnMapKeyPrune. Try -t ColumnMapKeyPrune

--
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