pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PIG-2185) NullPointerException while Accessing Empty Bag in FOREACH { FILTER }
Date Fri, 19 Aug 2011 19:54:29 GMT

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

jiraposter@reviews.apache.org commented on PIG-2185:
----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/1600/
-----------------------------------------------------------

Review request for pig and thejas.


Summary
-------

See PIG-2185


This addresses bug PIG-2185.
    https://issues.apache.org/jira/browse/PIG-2185


Diffs
-----

  trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java
1159433 
  trunk/test/org/apache/pig/test/TestEvalPipeline2.java 1159433 

Diff: https://reviews.apache.org/r/1600/diff


Testing
-------

test-patch pass:
[exec] +1 overall.
[exec]
[exec] +1 @author. The patch does not contain any @author tags.
[exec]
[exec] +1 tests included. The patch appears to include 3 new or modified tests.
[exec]
[exec] +1 javadoc. The javadoc tool did not generate any warning messages.
[exec]
[exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
[exec]
[exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
[exec]
[exec] +1 release audit. The applied patch does not increase the total number of release audit
warnings.

Unit tests pass.


Thanks,

Daniel



> NullPointerException while Accessing Empty Bag in FOREACH { FILTER }
> --------------------------------------------------------------------
>
>                 Key: PIG-2185
>                 URL: https://issues.apache.org/jira/browse/PIG-2185
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.9.0
>            Reporter: Mitesh Singh Jat
>            Assignee: Daniel Dai
>             Fix For: 0.9.1, 0.10
>
>         Attachments: PIG-2185-1.patch
>
>
> On doing FILTERing on empty bag inside FOREACH, NullPointerException occurs.
> The following pig script demonstrates the issue:
> {code:title=empty_bag.pig}
> A = LOAD 'input/empty_bag.in' USING PigStorage() AS (bg:bag{}, ch:chararray);
> B = FOREACH A {
>      x = FILTER bg BY $0 == '12';
>          GENERATE
>          *, 
>          x;
>          };
> DUMP B;
> {code}
> Input is:
> {code:title=input/empty_bag.in}
> {(12)}  a
> {(23)}  b
>         c
> {code}
> Upon execution of Pig Script empty_bag.pig, the NullPointerException comes as shown below:
> {code}
> $ pig -x local empty_bag.pig
> ...
> 2011-07-11 09:52:56,810 [Thread-3] WARN  org.apache.hadoop.mapred.LocalJobRunner - job_local_0001
> java.lang.NullPointerException
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.getNext(POProject.java:448)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:290)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POFilter.getNext(POFilter.java:95)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:406)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POProject.processInputBag(POProject.java:570)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.PORelationToExprProject.getNext(PORelationToExprProject.java:107)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:316)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.processInput(POUserFunc.java:159)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:184)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POUserFunc.getNext(POUserFunc.java:258)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.getNext(PhysicalOperator.java:316)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:332)
>         at
> org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:284)
>         at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.runPipeline(PigMapBase.java:261)
>         at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:256)
>         at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:58)
>         at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:144)
>         at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:764)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:370)
>         at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:210)
> ...
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message