You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Cristian Opris (JIRA)" <ji...@apache.org> on 2012/11/23 15:32:58 UTC

[jira] [Created] (CASSANDRA-4989) Expose new SliceQueryFilter features through Thrift interface

Cristian Opris created CASSANDRA-4989:
-----------------------------------------

             Summary: Expose new SliceQueryFilter features through Thrift interface
                 Key: CASSANDRA-4989
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4989
             Project: Cassandra
          Issue Type: Improvement
          Components: API
    Affects Versions: 1.2.0, 1.2.1, 1.3
            Reporter: Cristian Opris


SliceQueryFilter has some very useful new features like ability to specify a composite column prefix to group by and specify a limit of groups to return.

This is very useful if for example I have a wide row with columns prefixed by timestamp and I want to retrieve the latest columns, but I don't know the column names. Say I have a row
{{row -> (t1, c1), (t1, c2)... (t1, cn) ... (t0,c1) ... etc}}

Query slice range (t1,) group by prefix (1) limit (1)

As a more general question, is the Thrift interface going to be kept up-to-date with the feature changes or will it be left behind (a mistake IMO) ?



--
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

[jira] [Commented] (CASSANDRA-4989) Expose new SliceQueryFilter features through Thrift interface

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503226#comment-13503226 ] 

Sylvain Lebresne commented on CASSANDRA-4989:
---------------------------------------------

I'm not sure I understand your example. The way I understand your {{Query slice range (t1,) group by prefix (1) limit (1)}} you are literally asking for every columns staring with t1. You can absolutely do that with the thrift API currently (using CompositeType has a end-of-component feature).

Besides, the group by prefix is a CQL3 implementation detail and does more than just grouping by prefix when counting (it also skip deleted records in some conditions that only make sense for CQL3 for instance). The exact semantic of that counting may change depending on the needs of CQL3 and is not something that has ever been meant to be exposed directly. 
                
> Expose new SliceQueryFilter features through Thrift interface
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-4989
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4989
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.2.0, 1.2.1, 1.3
>            Reporter: Cristian Opris
>
> SliceQueryFilter has some very useful new features like ability to specify a composite column prefix to group by and specify a limit of groups to return.
> This is very useful if for example I have a wide row with columns prefixed by timestamp and I want to retrieve the latest columns, but I don't know the column names. Say I have a row
> {{row -> (t1, c1), (t1, c2)... (t1, cn) ... (t0,c1) ... etc}}
> Query slice range (t1,) group by prefix (1) limit (1)
> As a more general question, is the Thrift interface going to be kept up-to-date with the feature changes or will it be left behind (a mistake IMO) ?

--
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

[jira] [Commented] (CASSANDRA-4989) Expose new SliceQueryFilter features through Thrift interface

Posted by "Cristian Opris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4989?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13503241#comment-13503241 ] 

Cristian Opris commented on CASSANDRA-4989:
-------------------------------------------

Sorry if I haven't been more clear. What I'd like is to do that query efficiently when I don't know t1 precisely, I
just want to get the latest columns before a time T

That can be done currently with Thrift but will return all columns with time t < T, while this way I can efficiently
get just the latest

Note that "as of" type queries are very common in financial type applications for example, so it's worth considering this
use case.

I'm not sure about the handling of deleted keys but maybe we can find a way to generalize and expose this ? I would have asked for a feature like this anyway, it just so happens that looking at the code I see this has been done to support CQL limits

Since I have an object serialization client API on top of Thrift, CQL is not much use to me...
                
> Expose new SliceQueryFilter features through Thrift interface
> -------------------------------------------------------------
>
>                 Key: CASSANDRA-4989
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4989
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: API
>    Affects Versions: 1.2.0, 1.2.1, 1.3
>            Reporter: Cristian Opris
>
> SliceQueryFilter has some very useful new features like ability to specify a composite column prefix to group by and specify a limit of groups to return.
> This is very useful if for example I have a wide row with columns prefixed by timestamp and I want to retrieve the latest columns, but I don't know the column names. Say I have a row
> {{row -> (t1, c1), (t1, c2)... (t1, cn) ... (t0,c1) ... etc}}
> Query slice range (t1,) group by prefix (1) limit (1)
> As a more general question, is the Thrift interface going to be kept up-to-date with the feature changes or will it be left behind (a mistake IMO) ?

--
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