You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Richard Ding (JIRA)" <ji...@apache.org> on 2009/12/04 19:49:20 UTC

[jira] Updated: (PIG-1086) Nested sort by * throw exception

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

Richard Ding updated PIG-1086:
------------------------------

    Attachment: PIG-1086.patch

The cause of this bug is that the schema of the project (*) operator isn't set correctly before applying ProjectStarTranslator and therefore project (*) operator isn't  translated to a list of projection operators. This causes the inconsistency (and the exception). This patch provides a fix.

> Nested sort by * throw exception
> --------------------------------
>
>                 Key: PIG-1086
>                 URL: https://issues.apache.org/jira/browse/PIG-1086
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.5.0
>            Reporter: Daniel Dai
>            Assignee: Richard Ding
>         Attachments: PIG-1086.patch
>
>
> The following script fail:
> A = load '1.txt' as (a0, a1, a2);
> B = group A by a0;
> C = foreach B { D = order A by *; generate group, D;};
> explain C;
> Here is the stack:
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
>         at java.util.ArrayList.get(ArrayList.java:324)
>         at org.apache.pig.impl.logicalLayer.schema.Schema.getField(Schema.java:752)
>         at org.apache.pig.impl.logicalLayer.LOSort.getSortInfo(LOSort.java:332)
>         at org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogToPhyTranslationVisitor.visit(LogToPhyTranslationVisitor.java:1365)
>         at org.apache.pig.impl.logicalLayer.LOSort.visit(LOSort.java:176)
>         at org.apache.pig.impl.logicalLayer.LOSort.visit(LOSort.java:43)
>         at org.apache.pig.impl.plan.DependencyOrderWalkerWOSeenChk.walk(DependencyOrderWalkerWOSeenChk.java:69)
>         at org.apache.pig.backend.hadoop.executionengine.physicalLayer.LogToPhyTranslationVisitor.visit(LogToPhyTranslationVisitor.java:1274)
>         at org.apache.pig.impl.logicalLayer.LOForEach.visit(LOForEach.java:130)
>         at org.apache.pig.impl.logicalLayer.LOForEach.visit(LOForEach.java:45)
>         at org.apache.pig.impl.plan.DependencyOrderWalker.walk(DependencyOrderWalker.java:69)
>         at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>         at org.apache.pig.backend.hadoop.executionengine.HExecutionEngine.compile(HExecutionEngine.java:234)
>         at org.apache.pig.PigServer.compilePp(PigServer.java:864)
>         at org.apache.pig.PigServer.explain(PigServer.java:583)
>         ... 8 more

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