Hi all, This is a really long overdue email. Finally I got the time to get around to this while I am on holidays (:
I've made some changes to the Gora-Cassandra to support AvroUnion data types even though Cassandra doesn't rely on Avro for serializing data. So what it has been done is a workaround to save specialized data types e.g. UNIONS. I faced the same problems and doubts that Alfonso described, and Alfonso, your post was very illustrative mate ;) I will just explain the general approach so the changes can be understood and the changes themselves can be found inside the code, or reply to this email to talk about it. ** For storing Union data ** We are creating a new column only on at the moment in which we are flushing the data into the data store. This generated column will store the index of the schema used within the Union data type. ** For retrieving Union data ** Retrieving the data directly from Cassandra, Gora can make it by itself. The problem here was to determine which serializer to use while getting this data back. So the first thing to do is to get the value stored within the generated column, and use that value to select the appropriate serializer. After that is just using what Gora has in it. ** For generating classes ** I am not particularly happy with the changes I've made here. I changed GoraCompiler directly to create the extra field to store the selected schema of the Union data type. I tried to only add a new field to the schema before compiling and then let the compiler work but I kept on getting a lock exception from Avro which didn't let me get through this change as I wanted. If anybody could help me out on how to do it, then give me a shout! :) I didn't know where to upload this patch or to Gora-174 because it addresses an issues caused by it, or to create a new issue to handle the Avro Union per data store. Thanks for reading until the end! Renato M.

