You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pig.apache.org by Iman Elghandour <ie...@yahoo.com> on 2009/04/08 23:48:54 UTC

MultiQuery branch: ERROR 1067: Unable to explain alias null

Hello all,
I keep getting this error when I try to use the explain
in the multiquery branch; like : grunt> explain script.pig.   I debugged the code and found that the alias
sent to the PigServer.getStorePlan(alias) is null. Well the log
indicates the same thing. I am not sure if this alias is expected to be
the script name or a leaf from the script.  I am using the latest code in the branch.

Below is the log of the error:

ERROR 1067: Unable to explain alias null
org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1067: Unable to explain alias null
        at org.apache.pig.PigServer.explain(PigServer.java:576)
        at org.apache.pig.tools.grunt.GruntParser.explainCurrentBatch(GruntParser.java:282)
        at
 org.apache.pig.tools.grunt.GruntParser.processExplain(GruntParser.java:235)
        at org.apache.pig.tools.pigscript.parser.PigScriptParser.Explain(PigScriptParser.java:485)
        at org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.java:215)
        at org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:142)
        at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
        at org.apache.pig.Main.main(Main.java:329)
Caused by: java.lang.NullPointerException
        at org.apache.pig.impl.plan.OperatorPlan.add(OperatorPlan.java:134)
        at
 org.apache.pig.impl.logicalLayer.parser.QueryParser.generateStorePlan(QueryParser.java:125)
        at org.apache.pig.PigServer.getStorePlan(PigServer.java:726)
        at org.apache.pig.PigServer.explain(PigServer.java:559)
        ... 7 more

Any suggestion how I can fix this error?
Thanks,
Iman.


      __________________________________________________________________
Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now
http://ca.toolbar.yahoo.com..

Re: MultiQuery branch: ERROR 1067: Unable to explain alias null

Posted by Gunther Hagleitner <ha...@yahoo-inc.com>.
Iman,

I think what you have to do to make it work is:

grunt:> explain -script script.pig

Having said that, this still needs to be fixed. The error message is
completely misleading. Can you open a jira ticket to track this? If you
would like to fix it, I recommend to start by looking at how the statement
is parsed in PigScriptParser.jj and see if we can catch the case and inform
the user in a more meaningful way.

Thanks,
Gunther.

> Hello all,
> I keep getting this error when I try to use the explain
> in the multiquery branch; like : grunt> explain script.pig.   I debugged the
> code and found that the alias
> sent to the PigServer.getStorePlan(alias) is null. Well the log
> indicates the same thing. I am not sure if this alias is expected to be
> the script name or a leaf from the script.  I am using the latest code in the
> branch.
> 
> Below is the log of the error:
> 
> ERROR 1067: Unable to explain alias null
> org.apache.pig.impl.logicalLayer.FrontendException: ERROR 1067: Unable to
> explain alias null
>         at org.apache.pig.PigServer.explain(PigServer.java:576)
>         at 
> org.apache.pig.tools.grunt.GruntParser.explainCurrentBatch(GruntParser.java:28
> 2)
>         at
>  org.apache.pig.tools.grunt.GruntParser.processExplain(GruntParser.java:235)
>         at 
> org.apache.pig.tools.pigscript.parser.PigScriptParser.Explain(PigScriptParser.
> java:485)
>         at 
> org.apache.pig.tools.pigscript.parser.PigScriptParser.parse(PigScriptParser.ja
> va:215)
>         at 
> org.apache.pig.tools.grunt.GruntParser.parseStopOnError(GruntParser.java:142)
>         at org.apache.pig.tools.grunt.Grunt.run(Grunt.java:69)
>         at org.apache.pig.Main.main(Main.java:329)
> Caused by: java.lang.NullPointerException
>         at org.apache.pig.impl.plan.OperatorPlan.add(OperatorPlan.java:134)
>         at
>  
> org.apache.pig.impl.logicalLayer.parser.QueryParser.generateStorePlan(QueryPar
> ser.java:125)
>         at org.apache.pig.PigServer.getStorePlan(PigServer.java:726)
>         at org.apache.pig.PigServer.explain(PigServer.java:559)
>         ... 7 more
> 
> Any suggestion how I can fix this error?
> Thanks,
> Iman.
> 
> 
>       __________________________________________________________________
> Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your
> favourite sites. Download it now
> http://ca.toolbar.yahoo.com..