[
https://issues.apache.org/jira/browse/PIG-1988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Richard Ding updated PIG-1988:
------------------------------
Attachment: PIG-1988.patch
> 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