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

Alan Gates reassigned PIG-288:
------------------------------

    Assignee: Pi Song

> Null pointer exception with load as schema - Optimizer
> ------------------------------------------------------
>
>                 Key: PIG-288
>                 URL: https://issues.apache.org/jira/browse/PIG-288
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>    Affects Versions: 0.2.0
>            Reporter: Santhosh Srinivasan
>            Assignee: Pi Song
>         Attachments: PIG_288_OptimizerNPE.patch, PIG_288_OptimizerNPE_2.patch
>
>
> A new test case (testNestedPlan) added to TestEvalPipeline has the following 
> query:
>         pig.registerQuery("A = LOAD 'file:" + tmpFile + "'as (a:int, 
> b:int);");
>         pig.registerQuery("B = group A by $0;");
>         + "C1 = filter A by $0 > -1;"
>         + "C2 = distinct C1;"
>         + "C3 = distinct A;"
>         + "generate (int)group;"
>         + "};";
> Testcase: testNestedPlan took 0.913 sec
>     Caused an ERROR
> Unable to open iterator for alias: C
> java.io.IOException: Unable to open iterator for alias: C
>     at 
> org.apache.pig.impl.util.WrappedIOException.wrap(WrappedIOException.java:34)
>     at org.apache.pig.PigServer.openIterator(PigServer.java:268)
>     at 
> org.apache.pig.test.TestEvalPipeline.testNestedPlan(TestEvalPipeline.java:376)
> Caused by: org.apache.pig.impl.plan.optimizer.OptimizerException: Unable to 
> insert type casts into plan
>     at 
> org.apache.pig.impl.logicalLayer.optimizer.TypeCastInserter.transform(TypeCastInserter.java:144)
>     at 
> org.apache.pig.impl.plan.optimizer.PlanOptimizer.optimize(PlanOptimizer.java:63)
>     at org.apache.pig.PigServer.compileLp(PigServer.java:551)
>     at org.apache.pig.PigServer.execute(PigServer.java:477)
>     at org.apache.pig.PigServer.openIterator(PigServer.java:259)
>     ... 16 more
> Caused by: java.lang.NullPointerException
>     at org.apache.pig.impl.logicalLayer.LOVisitor.visit(LOVisitor.java:121)
>     at 
> org.apache.pig.impl.logicalLayer.optimizer.SchemaRemover.visit(SchemaRemover.java:65)
>     at org.apache.pig.impl.logicalLayer.LOCogroup.visit(LOCogroup.java:273)
>     at org.apache.pig.impl.logicalLayer.LOCogroup.visit(LOCogroup.java:37)
>     at 
> org.apache.pig.impl.plan.DependencyOrderWalker.walk(DependencyOrderWalker.java:68)
>     at org.apache.pig.impl.plan.PlanVisitor.visit(PlanVisitor.java:51)
>     at 
> org.apache.pig.impl.logicalLayer.optimizer.LogicalTransformer.rebuildSchemas(LogicalTransformer.java:57)
>     at 
> org.apache.pig.impl.logicalLayer.optimizer.TypeCastInserter.transform(TypeCastInserter.java:141)
>     ... 20 more

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