[ 
https://issues.apache.org/jira/browse/CASSANDRA-3281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13563092#comment-13563092
 ] 

Edward Capriolo commented on CASSANDRA-3281:
--------------------------------------------

I think AnyType's null concept can be solved with a composite type of 
(booleanType, whateverType) where the first column represents null 
(True|False). After that I think the only novel concept here is being able to 
store any Comparable and Serializable object directly. Maybe that should be a 
separate issue. I believe that is still valid, it is not different then storing 
a string or a BigInteger. You can compose/decompose it and your can sort it.

There is still a case to be made for columns that store metadata internally. We 
do allow custom index implementations, so I could imagine a type like this 
combined with a custom indexer. 

CQL3 still false short here, as the composites. Composites have fixed 
definitions, dynamic composites are close but are limiting, and collections 
only deal with repetition not arbitrary objects. 

So this issue does not stay open forever, how about I produce another patch for 
an AbstractType implementation called SerializableComparableType. This type 
would allow any serializable/comparable java type to be stored.


                
> Add an AbstractType anytype which stores meta data on a per column basis
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-3281
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3281
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Edward Capriolo
>            Priority: Minor
>
> A pet project of mine is an AbstractType for Cassandra that stores metadata 
> of the type in the column. https://github.com/edwardcapriolo/Cassandra-AnyType
> I described my use case any my design decisions here. 
> https://github.com/edwardcapriolo/Cassandra-AnyType/blob/master/README . The 
> biggest cases were needing to support null and '' as keys, column names, and 
> column values, however I also think the technique used to serialize Java 
> Objects as JSON but compare as a Java object is novel. 
> Side node: (The AbstractType interface has changed multiple times between 
> 0.6.X, 0.7.X, and 1.0.0-beta. I hope it stabilizes! ) 
> If people would like AnyType (or parts of it ) incorporated into Cassandra 
> that would be great. I am willing to tweak change it based on other peoples 
> ideas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to