PIG-5066: e2e Jython_Checkin_2 failing due to floating precision difference (knoguchi)


git-svn-id: https://svn.apache.org/repos/asf/pig/trunk@1770726 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CHANGES.txt b/CHANGES.txt
index 8965aaa..a6e5c64 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -59,6 +59,8 @@
  
 BUG FIXES
 
+PIG-5066: e2e Jython_Checkin_2 failing due to floating precision difference (knoguchi)
+
 PIG-5063: e2e IOErrors_1 on mapreduce is unstable (knoguchi)
 
 PIG-5062: Allow Native e2e tests to run in parallel (knoguchi)
diff --git a/test/e2e/pig/tests/turing_jython.conf b/test/e2e/pig/tests/turing_jython.conf
index 08e1204..077231b 100644
--- a/test/e2e/pig/tests/turing_jython.conf
+++ b/test/e2e/pig/tests/turing_jython.conf
@@ -50,7 +50,7 @@
 e = cogroup c by (name, age), d by (name, age) ;
 f = foreach e generate flatten(c), flatten(d);
 g = group f by registration;
-h = foreach g generate group, SUM(f.d::contributions);
+h = foreach g generate group, (float) ROUND(SUM(f.d::contributions) * 100) / 100.0;
 i = order h by $1;
 store i into '$out';
 """).bind({'in1':input1,'in2':input2, 'out':output}).runSingle() 
@@ -68,7 +68,7 @@
                                          e = cogroup c by (name, age), d by (name, age) ;
                                          f = foreach e generate flatten(c), flatten(d);
                                          g = group f by registration;
-                                         h = foreach g generate group, SUM(f.d::contributions);
+                                         h = foreach g generate group, (float) ROUND(SUM(f.d::contributions) * 100) / 100.0;
                                          i = order h by $1;
                                          store i into ':OUTPATH:';
 \,