Details
-
Bug
-
Resolution: Incomplete
-
Major
-
None
-
2.4.0-dp2
-
None
Description
Create a document with a very large number, e.g.:
{
|
"bignum": 12345678901234567890123456789,
|
"bignum_str": "12345678901234567890123456789"
|
}
|
Put it in the default bucket. Run a query with pretty=false, and it comes back fine:
curl "http://Administrator:bluehorse@127.0.0.1:9093/query/service?statement=select%20*%20from%20default&pretty=false"
|
{
|
"requestID": "ea376505-2e01-4b4c-b494-6d8a7ce786ba",
|
"signature": {"*":"*"},
|
"results": [
|
{"default":{
|
"bignum": 12345678901234567890123456789,
|
"bignum_str": "12345678901234567890123456789"
|
}}
|
],
|
"status": "success",
|
"metrics": {"elapsedTime": "23.35ms","executionTime": "23.314ms","resultCount": 1,"resultSize": 102}
|
}
|
But if you run the same query with pretty=true, precision is lost in the number:
curl "http://Administrator:bluehorse@127.0.0.1:9093/query/service?statement=select%20*%20from%20default&pretty=true"
|
{
|
"requestID": "6c2aec5c-4e40-4a83-8b26-919b61e91c5d",
|
"signature": {
|
"*": "*"
|
},
|
"results": [
|
{
|
"default": {
|
"bignum": 12345678901234568000000000000,
|
"bignum_str": "12345678901234567890123456789"
|
}
|
}
|
],
|
"status": "success",
|
"metrics": {
|
"elapsedTime": "15.024ms",
|
"executionTime": "14.993ms",
|
"resultCount": 1,
|
"resultSize": 169
|
}
|
}
|