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

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



bq.  On 2011-08-19 20:13:04, Santhosh Srinivasan wrote:
bq.  > 
trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java,
 line 447
bq.  > <https://reviews.apache.org/r/1600/diff/1/?file=33803#file33803line447>
bq.  >
bq.  >     The variable should be declared after the null check. If the null 
check is false  then the variable is never used.

I will change it. Thanks Santhosh!


- Daniel


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


On 2011-08-19 19:54:30, Daniel Dai wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1600/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-08-19 19:54:30)
bq.  
bq.  
bq.  Review request for pig and thejas.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  See PIG-2185
bq.  
bq.  
bq.  This addresses bug PIG-2185.
bq.      https://issues.apache.org/jira/browse/PIG-2185
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/expressionOperators/POProject.java
 1159433 
bq.    trunk/test/org/apache/pig/test/TestEvalPipeline2.java 1159433 
bq.  
bq.  Diff: https://reviews.apache.org/r/1600/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  test-patch pass:
bq.  [exec] +1 overall.
bq.  [exec]
bq.  [exec] +1 @author. The patch does not contain any @author tags.
bq.  [exec]
bq.  [exec] +1 tests included. The patch appears to include 3 new or modified 
tests.
bq.  [exec]
bq.  [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
bq.  [exec]
bq.  [exec] +1 javac. The applied patch does not increase the total number of 
javac compiler warnings.
bq.  [exec]
bq.  [exec] +1 findbugs. The patch does not introduce any new Findbugs warnings.
bq.  [exec]
bq.  [exec] +1 release audit. The applied patch does not increase the total 
number of release audit warnings.
bq.  
bq.  Unit tests pass.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Daniel
bq.  
bq.



> 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

        

Reply via email to