divide by 0 is not handled correctly
------------------------------------
Key: PIG-418
URL: https://issues.apache.org/jira/browse/PIG-418
Project: Pig
Issue Type: Bug
Components: impl
Affects Versions: types_branch
Reporter: Olga Natkovich
Assignee: Olga Natkovich
Fix For: types_branch
A = load 'data' as (name:chararray, age:int, gpa:double);
B = foreach A generate age, (int)(age/(age - 20));
store B into 'types_2_3';
Get the following exceptiopn
08/09/05 10:56:55 ERROR mapReduceLayer.Launcher: Error message from task (map)
tip_200808261638_3046_m_000000java.lang.ArithmeticException: / by zero
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.Divide.getNext(Divide.java:119)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators.POCast.getNext(POCast.java:139)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.processPlan(POForEach.java:211)
at
org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNext(POForEach.java:156)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapBase.map(PigMapBase.java:127)
at
org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigMapOnly$Map.map(PigMapOnly.java:64)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:47)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:219)
at
org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2124)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.