Re: select from table with list collection

2015-02-15 Thread reader 1001
I am using Cassandra 2.1.2. 1) yes, it works fine with any single element of the list "contains 'b'" and "contains 'c'" 2) if I add a second condition, it doesn't work 3) if I change list to set, it works properly, but doesn't work for my use case because i may have duplicates I files a Jira ticke

Re: select from table with list collection

2015-02-15 Thread Jack Krupansky
That should work. File a Jira. While release of Cassandra are you using? There were some bugs is indexing for set collections; maybe that affected list as well. Out of curiosity, does a SELECT with only "contains 'b'" work? Also, try using "set" rather than "list". -- Jack Krupansky On Sun, Feb

select from table with list collection

2015-02-15 Thread reader 1001
I have a simple table with an indexed list field, but it shows unexpected behavior when I query the list. Am i doing something incorrect? create table test (whole text PRIMARY KEY, parts list); create index on test (parts); insert into test (whole,parts) values('a', ['a']); insert into test (whole

Re: Storing bi-temporal data in Cassandra

2015-02-15 Thread Peter Lin
I've built several different bi-temporal databases over the year for a variety of applications, so I have to ask "why are you modeling it this way?" Having a temperatures table doesn't make sense to me. Normally a bi-temporal database has transaction time and valid time. The transaction time is th

Re: Storing bi-temporal data in Cassandra

2015-02-15 Thread Jack Krupansky
I had forgotten, but there is a new tuple notation to iterate over more than one clustering column in C* 2.0.6: https://issues.apache.org/jira/browse/CASSANDRA-4851 For example, SELECT ... WHERE (c1, c2) > (1, 0) There's an example in the CQL spec: https://cassandra.apache.org/doc/cql3/CQL.html

Re: Storing bi-temporal data in Cassandra

2015-02-15 Thread Jack Krupansky
The simple, easy way to look at this is that you can use a range when the data will be contiguous.Only by allowing only the last clustering column to use a range can Cassandra be assured that the rows selected by the range will be contiguous (a "slice.") The point is that Cassandra is designed for

Re: Storing bi-temporal data in Cassandra

2015-02-15 Thread Dave Brosius
As you point out, there's not really a node-based problem with your query from a performance point of view. This is a limitation of CQL in that, cql wants to slice one section of a partition's row (no matter how big the section is). In your case, you are asking to slice multiple sections of a p

Re: Storing bi-temporal data in Cassandra

2015-02-15 Thread Laing, Michael
Perhaps you should learn more about Cassandra before you ask such questions. It's easy if you just look at the readily accessible docs. ml On Sat, Feb 14, 2015 at 6:05 PM, Raj N wrote: > I don't think thats solves my problem. The question really is why can't we > use ranges for both time colum