https://pinot.apache.org/ logo
#troubleshooting
Title
# troubleshooting
a

Alice

04/29/2022, 8:43 AM
Hi, what’s the best type choice for current in Pinot? Is it STRING?
r

Richard Startin

04/29/2022, 8:43 AM
can you paraphrase your question? What problem are you trying to solve?
a

Alice

04/29/2022, 8:51 AM
sorry, it’s a typo. I mean, currency or money.
For mysql, it’s decimal type.
r

Richard Startin

04/29/2022, 9:03 AM
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

Kartik Khare

04/29/2022, 10:38 AM
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

Alice

05/01/2022, 12:53 PM
👍