Hi, what’s the best type choice for current in Pin...
# troubleshooting
a
Hi, what’s the best type choice for current in Pinot? Is it STRING?
r
can you paraphrase your question? What problem are you trying to solve?
a
sorry, it’s a typo. I mean, currency or money.
For mysql, it’s decimal type.
r
ok
do you have multiple currencies or only one?
there isn't a built in data type for this, but if you convert into cents you can store as a
LONG
however, aggregation will performed using floating point numbers, so is inexact
k
We have support for
SUM_WITH_PRECISION
but it only works for big decimal columns which are currently stored as byte[] https://github.com/apache/pinot/pull/6053 For better performance, we already have an effort in progress to add
DECIMAL
with fixed precision data type support https://github.com/apache/pinot/pull/8503
a
👍