You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Xuefu Zhang (JIRA)" <ji...@apache.org> on 2011/04/11 23:31:05 UTC
[jira] [Commented] (PIG-1988) Importing an empty macro file causing
NPE
[ https://issues.apache.org/jira/browse/PIG-1988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13018579#comment-13018579 ]
Xuefu Zhang commented on PIG-1988:
----------------------------------
+1
> Importing an empty macro file causing NPE
> -----------------------------------------
>
> Key: PIG-1988
> URL: https://issues.apache.org/jira/browse/PIG-1988
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.9.0
> Reporter: Xuefu Zhang
> Assignee: Richard Ding
> Fix For: 0.9.0
>
> Attachments: PIG-1988.patch
>
>
> The following script, which imports an empty macro file, causes a NPE.
> import 'macros.pig';
> A = load 'x';
> B = foreach A generate flatten($0);
> Stack trace:
> Caused by: java.lang.NullPointerException
> at org.antlr.runtime.tree.BaseTree.addChildren(BaseTree.java:133)
> at org.apache.pig.parser.QueryParserUtils.replaceNodeWithNodeList(QueryParserUtils.java:194)
> at org.apache.pig.parser.QueryParserDriver.macroImport(QueryParserDriver.java:409)
> at org.apache.pig.parser.QueryParserDriver.expandImport(QueryParserDriver.java:274)
> at org.apache.pig.parser.QueryParserDriver.expandMacro(QueryParserDriver.java:214)
> at org.apache.pig.parser.QueryParserDriver.parse(QueryParserDriver.java:86)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira