https://pinot.apache.org/ logo
#pinot-dev
Title
# pinot-dev
a

Amrish Lal

08/03/2021, 5:44 PM
@User The BOOLEAN datatype earlier was based on STRING, but now is based on INTEGER. I am wondering if the old tables that use BOOLEAN columns will continue working with STRING or do they need to be modified and upgraded? I am looking at a somewhat related issue (on the client side), but wondering how the backward compatibility works on the server side?
j

Jackie

08/03/2021, 6:13 PM
The old
BOOLEAN
type is directly stored as
STRING
in the schema, so within the cluster there should be no column explicitly configured as
BOOLEAN
for old tables. For the old tables, the column can be used the same way as before because it is stored as
STRING
. For the new added tables, if the column is defined as
BOOLEAN
, then it is stored as
BOOLEAN
in pinot
What kind of issue are you running into?
a

Amrish Lal

08/03/2021, 6:18 PM
We have a small layer on top of pinot broker. A user created a new table and when querying the boolean column in the table, this small layer produces an exception saying`java.lang.UnsupportedOperationException: Unsupported type for row valueclass java.lang.Boolean` . This is an easy fix on the client side, but I think we have some existing tables that have "BOOLEAN" type and I am not seeing any issues while querying those tables.
j

Jackie

08/03/2021, 6:21 PM
I see. As I explained above, the old table won't have column in
BOOLEAN
type. When the schema is uploaded, the data type is rewritten to
STRING
in the old version
a

Amrish Lal

08/03/2021, 6:21 PM
OK, great 🙂 I think I understand now. We should be good in that case.
j

Jackie

08/03/2021, 6:22 PM
Modifying the column type from
STRING
to
BOOLEAN
is not allowed fyi
a

Amrish Lal

08/03/2021, 6:22 PM
cool
j

Jackie

08/03/2021, 6:22 PM
So if you need to change the schema for the old tables, you might need to change the
BOOLEAN
to
STRING
if the schema is maintained outside of pinot
👍 1