You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Koji Noguchi (JIRA)" <ji...@apache.org> on 2017/05/25 14:59:04 UTC

[jira] [Updated] (PIG-5224) Extra foreach from ColumnPrune preventing Accumulator usage

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

Koji Noguchi updated PIG-5224:
------------------------------
    Attachment: pig-5224-v2.patch

{quote}
The inserted LOForEach remove all the columns which are not used in the scripts going forward. The next LOForEach is not necessary doing that.
{quote}
Well, if next LOForEach is not removing all the columns which are not used, then essentially those columns are being used and therefore ColumnPruner would not have tried to prune them in the first place? 

In any cases, I'm fine with moving this condition to LOCogroup only.  Attaching pig-5224-v2.patch.

> Extra foreach from ColumnPrune preventing Accumulator usage
> -----------------------------------------------------------
>
>                 Key: PIG-5224
>                 URL: https://issues.apache.org/jira/browse/PIG-5224
>             Project: Pig
>          Issue Type: Improvement
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>         Attachments: pig-5224-v0-testonly.patch, pig-5224-v1.patch, pig-5224-v2.patch
>
>
> {code}
> A = load 'input' as (id:int, fruit);
> B = foreach A generate id; -- to enable columnprune
> C = group B by id;
> D = foreach C {
>     o = order B by id;
>     generate org.apache.pig.test.utils.AccumulatorBagCount(o);
> }
> STORE D into ...
> {code}
> Pig fails to use Accumulator interface for this UDF.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)