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

Santhosh Srinivasan commented on PIG-995:
-----------------------------------------

Review comments:

The initialization code is fine. However, the try catch block is shared between 
the rebuildSchemas() and rebuildProjectionMaps() method invocation. This could 
lead to misleading error message. Specifically, if the rebuildSchemas() throws 
an exception then the error message will indicate that rebuilding projection 
maps failed.

> Limit Optimizer throw exception "ERROR 2156: Error while fixing projections"
> ----------------------------------------------------------------------------
>
>                 Key: PIG-995
>                 URL: https://issues.apache.org/jira/browse/PIG-995
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.3.0
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>             Fix For: 0.6.0
>
>         Attachments: PIG-995-1.patch, PIG-995-2.patch, PIG-995-3.patch
>
>
> The following script fail:
> A = load '1.txt' AS (a0, a1, a2);
> B = order A by a1;
> C = limit B 10;
> D = foreach C generate $0;
> dump D;
> Error log:
> Caused by: org.apache.pig.impl.plan.VisitorException: ERROR 2156: Error while 
> fixing projections. Projection map of node to be replaced is null.
>         at 
> org.apache.pig.impl.logicalLayer.ProjectFixerUpper.visit(ProjectFixerUpper.java:138)
>         at 
> org.apache.pig.impl.logicalLayer.LOProject.visit(LOProject.java:408)
>         at org.apache.pig.impl.logicalLayer.LOProject.visit(LOProject.java:58)
>         at 
> org.apache.pig.impl.plan.DepthFirstWalker.depthFirst(DepthFirstWalker.java:65)
>         at 
> org.apache.pig.impl.plan.DepthFirstWalker.walk(DepthFirstWalker.java:50)
>         at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>         at 
> org.apache.pig.impl.logicalLayer.LOForEach.rewire(LOForEach.java:761)

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

Reply via email to