Description
select 1492855384243896327 as a, tostring(1492855384243896327) as b; |
{
|
"requestID": "063db6e4-18f7-4073-bd8d-befaebbd269c", |
"signature": { |
"a": "number", |
"b": "string" |
},
|
"results": [ |
{
|
"a": 1492855384243896327, |
"b": "1492855384243896300" |
}
|
],
|
"status": "success", |
"metrics": { |
"elapsedTime": "2.873075ms", |
"executionTime": "2.855611ms", |
"resultCount": 1, |
"resultSize": 88 |
}
|
SELECT b.*, META().cas AS cas FROM ... => cas value is ok (1492855384243896332)
SELECT b.*, ENCODE_JSON(META().cas) AS cas FROM ... => same as above
SELECT b.*, TOSTRING(META().cas) AS cas FROM ... => cas value is NOT OK (1492855384243896300)
https://forums.couchbase.com/t/n1ql-returns-a-different-cas-than-the-driver-functions/9124/9
https://github.com/couchbase/query/blob/master/expression/func_type_conv.go#L398
If it is integer above place we should not convert to float64
Attachments
Issue Links
- relates to
-
MB-25290 [Backport - MB-24048] - long integers are truncated when used in TOSTRING()
- Closed