rantav/hector — Issue #382: Can't perform different deserializations on different columns of a Query
Author: vhmolinar
Created: 2012-01-07 23:17:47+00:00
State: open

Not really sure if it's a bug or just an hector limitation, but here we go.

Consider you are querying for multiple columns of multiple rows and for each row, you have different types of values(long, object,utf). Now consider you don't know the row key. Then you build up an IndexedSliceQuery using cassandra secondary indexes. In this case, once you query for it, you're gonna receive all the columns of each row matched with your filter.

But it's not that simple. Because there are different types of columns values.
So, couldn't you be able to perform different deserializations for each column of each row?
In this case, would be, Long Deserialization, MyDefinedType Deserialization and String Deserialization.

Since I'm setting MyDefinedTypeSerializer for the query instatiation, hector tells me that it can't be performed for these other types. And of course, it is obvious it can't perform it.

If it's not a bug, wouldn't it be a good enhancement ?

Hector version in use: 0.8.0-2

Thanks in advance.