Loose floating point precision
------------------------------
Key: PIG-82
URL: https://issues.apache.org/jira/browse/PIG-82
Project: Pig
Issue Type: Improvement
Components: data
Affects Versions: 0.1.0
Reporter: Daeho Baek
Pig looses floating point precision during conversion between binary and string
conversion.
Here is an example code.
words = LOAD '/user/daeho/words.txt' as (word);
numWords = FOREACH (GROUP words ALL) GENERATE COUNT($1);
weight = FOREACH numWords GENERATE 1.0 / $0;
wordsWithWeight = CROSS words, weight;
sumWeight = FOREACH (GROUP wordsWithWeight ALL) GENERATE SUM($1.$1);
dump sumWeight;
sumWeight is not 1 even though words.txt has 118 lines.
Can we store floating point as binary format?
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.