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

Sylvain Lebresne commented on CASSANDRA-3647:
---------------------------------------------

bq. The Cassandra CF containing these rows will contain single-level columns 
(field1), CT(ascii, int) (field2), and CT(ascii, uuid) (field3), assuming that 
we represent lists with v1 uuid column names, which seems like the best option 
to me.

One option would be to write a separate, specific, comparator that would 
basically be 'nothing or map or list or whateverelsewelladd'. So typically the 
comparator for exemple above would be: CompositeType(UTF8Type, 
NewShinyComparator). This avoids to mess with the composite type itself.

Going further, we could very well have a UnionType comparator that takes 
argument and allow a component to be one of different comparator (it could use 
the same kind of idea than DynamicCompositeType to differenciate between 
different elements). So basically we would have: CompositeType(UTF8Type, 
UnionType(MapType(ÅsciiType), ListType(AsciiType))).

I quite like that idea of composition of comparators. Typically CompositeType 
with UnionType would be equivalent to DynamicCompositeType but with even more 
flexibility (as you would be able to 'fix' some of the component, which is 
useful (especially for us in CQL3)).
                
> Support arbitrarily nested "documents" in CQL
> ---------------------------------------------
>
>                 Key: CASSANDRA-3647
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3647
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>              Labels: cql
>
> Composite columns introduce the ability to have arbitrarily nested data in a 
> Cassandra row.  We should expose this through CQL.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to