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

Pradeep Kamath commented on PIG-373:
------------------------------------

Another use case for the same issue:
{noformat}
grunt> register my.jar                                                          
     
grunt> a = load 'testdata' using MyLoader() as (s:map[], m, l);
grunt> b = foreach a generate s#'name';
grunt> describe a;
2008-08-12 18:33:45,960 [main] ERROR org.apache.pig.tools.grunt.GruntParser - 
java.io.IOException: Unable to describe schema for alias a [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:65)
        at org.apache.pig.PigServer.compileLp(PigServer.java:583)
        at org.apache.pig.PigServer.dumpSchema(PigServer.java:281)
        at 
org.apache.pig.tools.grunt.GruntParser.processDescribe(GruntParser.java:149)
        at 
org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:180)
        at 
org.apache.pig.tools.grunt.GruntParser.parseContOnError(GruntParser.java:92)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:58)
        at org.apache.pig.Main.main(Main.java:278)
Caused by: org.apache.pig.impl.plan.optimizer.OptimizerException: Unable to 
insert type casts into plan
        ... 9 more
Caused by: java.lang.NullPointerException
        at 
org.apache.pig.impl.logicalLayer.optimizer.LogicalTransformer.insertAfter(LogicalTransformer.java:203)
        at 
org.apache.pig.impl.logicalLayer.optimizer.TypeCastInserter.transform(TypeCastInserter.java:139)
        ... 8 more

{noformat}

> unconnected load causes exception
> ---------------------------------
>
>                 Key: PIG-373
>                 URL: https://issues.apache.org/jira/browse/PIG-373
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Olga Natkovich
>             Fix For: types_branch
>
>
> Load expects to be connected to another operator and when it is not,an 
> exception is raised. Two scripts that cause this behavior
> grunt> B = load 'foo' USING PigStorage() AS (s:chararray);
> grunt> dump B;
> grunt> B = load 'foo' USING PigStorage() AS (s:chararray);
> grunt> dump B;

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