i tried Schema Evolution in where initially I had...
# troubleshooting
a
i tried Schema Evolution in where initially I had 4 columns and I was reading data from kafka . The data also had 4 columns mentioned . now as we needed one more field we started sending data to our kafka , but this column wasn't mentioned in the table Schema. now when I mention the column in the schema . It started showing data but the value its taking is wrong the column xyz original value = 0 but its showing -2147483648 I checkd all the other columns there value is right but this column was addded later .
I was able to solve it but I had to delete the table and did a POST command again via CURL and then the original data showed up reloading the segments alone didnt work . Any better way to do it ?
@Xiang Fu @Mayank
x
There is a default null value in pinot schema which you can specify
a
I see but I need to delete the table configs actually and post it again via curl command to get the correct data there
x
you can update schema if it’s backward compatible
a
I did that , I updated the schema as I was adding the column and not deleting it . Also I dont think so schema is backward compatible , You cant delete sometime you can only add thats what I have figured out
x
Delete a column is not backward compatible operations
a
ok then what does backward compatible means?
sorry for lack of understanding
So when I add an extra column to my schema it says table configs are not configurd for that extra added column , then I have to go and delete the table config using the curl DELETE api and reload it using post. then it reloads all the segments . I guess there should be a better way to do it
as I can reload million and millions of rows again
w
Deleting a column is problematic when there is replication and in a distributed system. you can't make the change all at once the way you can with... well... hardly anyone runs systems that can be taken offline for that kind of maintenance anymore.
I haven't researched this for Pinot specifically but one way to make this kind of change is to create a new table, start sending data to both places, backfill the new table with the old data (excluding the deleted column), switch over to using the new table, and then eventually delete the old table once you're sure no one is using it. Sometimes it's just easier to stop filling in the unwanted column and ignore it.
m
@Aditya Verma as we discussed adding a new column does not require deleting table config. If you needed to do that that is probably because you have some setup which is not correct. Reloading segments after adding a column is super fast, it doesn't really need to travers over all data.