<@UDT7GFEG6> The BOOLEAN datatype earlier was base...
# pinot-dev
a
@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
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
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
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
OK, great 🙂 I think I understand now. We should be good in that case.
j
Modifying the column type from
STRING
to
BOOLEAN
is not allowed fyi
a
cool
j
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