[SERVER-10937] Infinity value in the field after mapreduce where i am multipling specific fields Created: 27/Sep/13  Updated: 11/Mar/14  Resolved: 08/Jan/14

Status: Closed
Project: Core Server
Component/s: MapReduce
Affects Version/s: 2.4.3
Fix Version/s: None

Type: Question Priority: Major - P3
Reporter: hemanthvijay Assignee: Amalia Hawkins
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

centos


Participants:

 Description   

I am performing mapreduce on a particular collection to get product of two columns .
eg:-

{type:'xyz'num1:1345324.234,num2:453553.234} {type:'xyz'num1:4652345.435534,num2:3252364.234}

The output is correct when i run on a small collection but on large collections i am geting output of an value as INFINITY.Please help me



 Comments   
Comment by Amalia Hawkins [ 08/Jan/14 ]

Hemanth – since I haven't heard back from you in two months, I'm going to assume this problem is no longer an issue and close the ticket. If this is not the case, please reopen.

Comment by Amalia Hawkins [ 04/Nov/13 ]

Hi, Hemanth. I ran the command you provided on the test input you provided and got the following values:

{ "_id" : "APPLE", "value" : { "userid" : "APPLE", "price" : 2139839307.5589435, "size" : 3162, "vwap" : 0 } }
{ "_id" : "MICROSOFT", "value" : { "userid" : "MICROSOFT", "price" : 13898087120.839998, "size" : 1430, "vwap" : 0 } }
{ "_id" : "SAMSUNG", "value" : { "userid" : "SAMSUNG", "price" : 140521732.1995, "size" : 812, "vwap" : 0 } }

This output seems correct.

Assuming that your test collection is larger than the sample you provided, are you certain that the final aggregate price does not exceed the limit of floating point numbers in JavaScript? (The limit is 1.7976931348623157E+10308.)

Comment by Daniel Pasette (Inactive) [ 29/Sep/13 ]

Not enough information to help. The sample doc you provided is not valid and you did not provide the code you are using.

Generated at Thu Feb 08 03:24:26 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.