hadoop-pig-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pradeep Kamath (JIRA)" <j...@apache.org>
Subject [jira] Updated: (PIG-522) Problem in using negative (-a)
Date Thu, 18 Dec 2008 19:59:44 GMT

     [ https://issues.apache.org/jira/browse/PIG-522?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Pradeep Kamath updated PIG-522:

    Assignee: Pradeep Kamath
      Status: Patch Available  (was: Open)

Currently PIG models negative numeric constants as a PONegative which has the corresponding
positive numeric constant as its operand. The root cause of the issue reported is that in
the LogToPhyTranslator, a PONegative PhysicalOperator is created from the LONegative LogicalOperator.
By default a PhysicalOperator's resultType is Tuple. This causes the error reported in the
bug since because the resultType is set to Tuple, PONegative.getNext(Tuple) is incorrectly
called instead of PONegative.getNext(Integer). The LogToPhyTranslator should change the resultType
for PONegative to be the same as the type of LONegative. 

The patch makes the needed code change in PONegative and also adds unit test to test it.

> Problem in using negative (-a)
> ------------------------------
>                 Key: PIG-522
>                 URL: https://issues.apache.org/jira/browse/PIG-522
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Pradeep Kamath
>             Fix For: types_branch
>         Attachments: PIG-522.patch
> Using negative, i.e., -a leads to exceptions. 
> {code}
> grunt> a = load 'myfile' as  (name:chararray, age:int, gpa:double);
> grunt> b = foreach a generate -gpa;
> grunt> dump b;
> 2008-11-10 16:38:12,517 [main] INFO  org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher
- 0% complete
> 2008-11-10 16:38:37,539 [main] ERROR org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher
- Map reduce job failed
> 2008-11-10 16:38:37,540 [main] ERROR org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.MapReduceLauncher
- Job failed!
> 2008-11-10 16:38:37,542 [main] ERROR org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher
- Error message from task (map) task_200809241441_19426_m_000000java.io.IOException: Received
Error while processing the map plan.
>         at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.runPipeline(PigMapBase.java:197)
>         at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:158)
>         at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$Map.map(PigMapOnly.java:65)
>         at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:47)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:227)
>         at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2207)
> {code}

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message