cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brosius <dbros...@mebigfatguy.com>
Subject Re: CompositeType/DynamicCompositeType for Row Key
Date Tue, 28 Feb 2012 17:32:57 GMT
With Key's you get validation if you use composite types... Also, you 
get prettier output in cli, but the value is less than with composite 
columns.



On 02/28/2012 11:59 AM, Philip Shon wrote:
> My row keys will actually be a date range.  Where the first value is 
> the starting date and the second value will be the length of that date 
> range.
>
> Each column inside each row will represent metadata related to a 
> specific product on during that date range.
>
> My question would be do I get any advantages with using the 
> CompositeType for my row key versus doing manual concatenation of the 
> two values in my code?
>
>
>
> On Tue, Feb 28, 2012 at 10:41 AM, Chris Gerken 
> <chrisgerken@mindspring.com <mailto:chrisgerken@mindspring.com>> wrote:
>
>     Phil,
>
>     That's the problem with examples :)
>
>     Row keys can be composite values.  That works just fine.  Was
>     there something in particular you were trying to do?
>
>     - Chris
>
>     Chris Gerken
>
>     chrisgerken@mindspring.com <mailto:chrisgerken@mindspring.com>
>     512.587.5261 <tel:512.587.5261>
>     http://www.linkedin.com/in/chgerken
>
>
>
>     On Feb 28, 2012, at 10:25 AM, Philip Shon wrote:
>
>>     I have not found any examples of utilizing a CompositeType of
>>     DynamicCompositeType as a row key.  Is doing this frowned upon?
>>     All the examples I've seen have been using a CompositeType only
>>     for Column names (or values).
>>
>>     My particular use case involves having the two components in the
>>     key being a Date (no time component) and an Integer value.
>>
>>     Thanks,
>>
>>     Phil
>>
>>
>
>


Mime
View raw message