Open kevinleeTCA opened 1 month ago
We currently fix it via converting it explicitly to float,
rentAmount: {
sql: `amount::float`,
type: `sum`,
},
but I am not sure if this is correct, as bigint
on postgres is 8 bytes. If float
in cube is 4 bytes, we still will have the overflow issues when big value appears. @paveltiunov do you know the actual length of float
in cube ?
Problem
Switched cube pre-aggregation storage (memory driver) from postgres to cubestore, encountered several feature not supported and data related precision issues, one of them is:
Related rollup
so the type of
amount
we defined in postgres isbigint
(8 bytes,-9223372036854775808 to +9223372036854775807
), we use it to represents the money amount in cents (an big integer)so what do we convert it to when doing the
measure
of typesum
? why is this value-109999999000000
an issue here ?The current cube version and cubestore version we are using is 1.0.1 (latest one published a couple of days ago),