You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Eric Evans (JIRA)" <ji...@apache.org> on 2010/11/04 15:07:43 UTC

[jira] Created: (CASSANDRA-1704) CQL reads (aka SELECT)

CQL reads (aka SELECT)
----------------------

                 Key: CASSANDRA-1704
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
             Project: Cassandra
          Issue Type: Sub-task
          Components: API
    Affects Versions: 0.8
            Reporter: Eric Evans
            Priority: Minor
             Fix For: 0.8


Data access specification and implementation for CQL.  

This corresponds to the following RPC methods:

* get()
* get_slice()
* get_count()
* multiget_slice()
* multiget_count()
* get_range_slices()
* get_indexed_slices()

The initial check-in to trunk/ uses a syntax that looks like:

{code:SQL}
SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
{code}

Where:
* <CF> is the column family name.
* <EXPRESSION> consists of relations chained by the AND keyword.
* <LVL> corresponds to one of the enum values in the RPC interface(s).

What is still undone:
* Support for indexes
* Counts
* Complete text coverage

And of course, all of this is still very much open to further discussion.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment:     (was: v2-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment: v2-0007-support-empty-unset-where-clause.txt
                v2-0006-add-support-for-index-scans.txt
                v2-0005-backfill-missing-system-tests.txt
                v2-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt
                v2-0003-make-avro-exception-factory-methods-public.txt
                v2-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt
                v2-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v2-0003-make-avro-exception-factory-methods-public.txt, v2-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v2-0005-backfill-missing-system-tests.txt, v2-0006-add-support-for-index-scans.txt, v2-0007-support-empty-unset-where-clause.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Jim Ancona commented on CASSANDRA-1704:
---------------------------------------

Is the plan to just return Avro Columns, to annotate those with types, and/or actually convert the names and values to a type before returning them? (The types would come either from meta-data on the server or conversions specified in the query.) 

In the latter two cases, the language needs to have syntax to specify conversions  in both directions (names and values to bytes and bytes to names and values in results).

If it's the former, then CQL doesn't strictly need syntax for both conversions, but clients would still need some way to specify how to deserialize the returned bytes. They could enhance the language to allow that (which implies they'd have to parse the enhanced language) or they could have their own mechanism (e.g. query for metadata separately and/or make the user specify it as part of their API).

I'd rather see language syntax support both conversions, and have the results either annotated or converted server-side. Clients that want to do their own deserialization could of course specify that results should be returned as bytes.


> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Hudson commented on CASSANDRA-1704:
-----------------------------------

Integrated in Cassandra #595 (See [https://hudson.apache.org/hudson/job/Cassandra/595/])
    CASSANDRA-1704. doc update for proposed SELECT

Patch by eevans


> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

I'm not sure it was obvious from my last comment, but the attached patch to the CQL doc (and the HTML copy) were meant to be a summation of the syntax/semantics discussed. If no one responds then I'll assume we have consensus and start working to make the implementation match (not responding is fine, as long as that __is__ what it means :)).  

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Jonathan Ellis commented on CASSANDRA-1704:
-------------------------------------------

+1 on the select part.

Note that "SELECT ... WHERE KEY >= startkey and KEY =< endkey AND name1 = value1" would currently require multiple internals calls; I created a patch for this in CASSANDRA-1600 but did not achieve consensus.

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment:     (was: v2-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

Actually, the attached patches are still short support for column counts, but there is no reason the attached patches couldn't be checked-in before that is done.

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v2-0003-make-avro-exception-factory-methods-public.txt, v2-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v2-0005-backfill-missing-system-tests.txt, v2-0006-add-support-for-index-scans.txt, v2-0007-support-empty-unset-where-clause.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Jonathan Ellis commented on CASSANDRA-1704:
-------------------------------------------

One point of clarification: how does <EXPRESSION> not count as support for indexes?

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Description: 
Data access specification and implementation for CQL.  

This corresponds to the following RPC methods:

* get()
* get_slice()
* get_count()
* multiget_slice()
* multiget_count()
* get_range_slices()
* get_indexed_slices()

The initial check-in to trunk/ uses a syntax that looks like:

{code:SQL}
SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
{code}

Where:
* <CF> is the column family name.
* <EXPRESSION> consists of relations chained by the AND keyword.
* <LVL> corresponds to one of the enum values in the RPC interface(s).

What is still undone:
* Support for indexes
* Counts
* Complete test coverage

And of course, all of this is still very much open to further discussion.


  was:
Data access specification and implementation for CQL.  

This corresponds to the following RPC methods:

* get()
* get_slice()
* get_count()
* multiget_slice()
* multiget_count()
* get_range_slices()
* get_indexed_slices()

The initial check-in to trunk/ uses a syntax that looks like:

{code:SQL}
SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
{code}

Where:
* <CF> is the column family name.
* <EXPRESSION> consists of relations chained by the AND keyword.
* <LVL> corresponds to one of the enum values in the RPC interface(s).

What is still undone:
* Support for indexes
* Counts
* Complete text coverage

And of course, all of this is still very much open to further discussion.



> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Tyler Hobbs commented on CASSANDRA-1704:
----------------------------------------

I also envisioned something similar to what Jonathan suggested.

As far as get_count() and multiget_count go, those could just be:

{noformat}
SELECT COUNT(<COLUMNS>) FROM ...
{noformat}

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment:     (was: v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment:     (was: v2-0005-backfill-missing-system-tests.txt)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans edited comment on CASSANDRA-1704 at 11/10/10 8:25 PM:
-----------------------------------------------------------------

Actually, the attached patches are still short support for column counts, but there is no reason they couldn't be checked-in before that is ready.

      was (Author: urandom):
    Actually, the attached patches are still short support for column counts, but there is no reason the attached patches couldn't be checked-in before that is done.
  
> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v2-0003-make-avro-exception-factory-methods-public.txt, v2-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v2-0005-backfill-missing-system-tests.txt, v2-0006-add-support-for-index-scans.txt, v2-0007-support-empty-unset-where-clause.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment:     (was: v2-0003-make-avro-exception-factory-methods-public.txt)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

bq. It tells it how to turn column names into byte[]:

Oh, I see.  Yeah I'm not sure I'm a fan of that.  I'd planned to handle that with different term definitions.

{code:SQL}
; So instead of...
SELECT 10000 MARSHAL AS Long FROM ...

; ...you'd have a term syntax that meant "long"
SELECT 10000L FROM ... 

; Instead of...
SELECT 12345678-1234-5678-1234-567812345678 MARSHAL AS TimeUuid FROM ...

; ...you'd do
SELECT TIMEUUID(12345678-1234-5678-1234-567812345678) FROM ...
{code}

And something like a TimeUuid ought to also be possible with string formatted dates, numeric timestamps, or in the case of an UPDATE, an argument-less version that means "now".

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans reassigned CASSANDRA-1704:
-------------------------------------

    Assignee:     (was: Eric Evans)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans reassigned CASSANDRA-1704:
-------------------------------------

    Assignee: Eric Evans

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v2-0003-make-avro-exception-factory-methods-public.txt, v2-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v2-0005-backfill-missing-system-tests.txt, v2-0006-add-support-for-index-scans.txt, v2-0007-support-empty-unset-where-clause.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment:     (was: v2-0006-add-support-for-index-scans.txt)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

Attached is a patch that updates doc/cql/CQL.textile for the changes to SELECT discussed in this issue so far (as I understand them).  I'm not 100% on whether to include all of >, >=, <, and <= for range specification considering that these are always term inclusive.  I'm also not sure 10,000 is the optimal default limit for columns and keys (I used that as more or less a place-holder).  Both of these are minor nits and could be dealt with now or at some point down-the-road, YMMV. 

As a convenience, I also attached an HTML copy of the patched document, (https://issues.apache.org/jira/secure/attachment/12459000/CQL.html).

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Jim Ancona commented on CASSANDRA-1704:
---------------------------------------

> Under what circumstances would you even want to encode a result to a type that was different than the one used to validate and/or sort it for storage?

I was thinking mostly of cases where type information isn't available. Right now, there is no type information available for keys and validation_class is optional for column values. For that reason, I think the ability to specify it for key and column values is important. I agree that it's not necessary for column names, especially in a first release, since the comparator type is always available. 

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans resolved CASSANDRA-1704.
-----------------------------------

    Resolution: Fixed
      Assignee: Eric Evans

I believe this to be complete at this point.

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment: v3-0008-SELECT-COUNT-.-FROM-support.txt
                v3-0007-support-empty-unset-where-clause.txt
                v3-0006-add-support-for-index-scans.txt
                v3-0005-backfill-missing-system-tests.txt
                v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt
                v3-0003-make-avro-exception-factory-methods-public.txt
                v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt
                v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v2-0003-make-avro-exception-factory-methods-public.txt, v2-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v2-0005-backfill-missing-system-tests.txt, v2-0006-add-support-for-index-scans.txt, v2-0007-support-empty-unset-where-clause.txt, v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

Thanks Pavel.

I've pushed these changes to SVN, but I'll leave this issue open for the time being, as a catch-all for any remaining bugs/improvements, and to give others time review/comment.

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Jonathan Ellis commented on CASSANDRA-1704:
-------------------------------------------

bq. I wonder if this isn't going to set people up for misunderstandings. 

No matter what you do, someone somewhere will misunderstand.  I think the greater benefit is that you can start by doing SQL-like SELECTs with index clauses and later graduate to doing slices on your own "materialized view" columnfamilies.  Emphasizing the similar rather than the different to start with is a positive thing imo.

bq. I'd planned to handle that with different term definitions

That works for me, although I'd prefer it to be uniform (long(10000) instead of 10000L).

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

Still chewing this over, but one reason this seems (somewhat )strange to me is that <COLUMNS> here is both of "a list of columns to include in the result" (like in an RDBMS), and "the query predicate" (or a portion of it anyway). I know that in a very real way those are kind of one and the same, but the SQL databases people are familiar with all have schema and the column names are identifiers. It's not just syntactically different, it's semantically different as well, and I wonder if this isn't going to set people up for misunderstandings.

Also, I'm not clear on whether you intended the <EXPRESSION> portion to remain the same; you chose a different syntax (less-SQL FWIW) to specifiy ranges and sets of columns than what I used in <EXPRESSION>.

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment:     (was: v2-0007-support-empty-unset-where-clause.txt)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Jonathan Ellis edited comment on CASSANDRA-1704 at 11/4/10 5:15 PM:
--------------------------------------------------------------------

bq. what does `MARSHAL AS' do here?

It tells it how to turn column names into byte[]:
{code}SELECT 12345678-1234-5678-1234-567812345678 MARSHAL AS TimeUuid FROM timeline WHERE key = ...{code}

bq. As far as get_count() and multiget_count go

+1.  Although this points out that we should probably not overload COUNT as column limit too.  Maybe revise <COLUMNS> to

{code}<CDL>|(REVERSED? FIRST <N> <SLICE>) [MARSHAL AS <TYPE>]{code}

(here I have used parens as a grouping notation, not literals.  not sure how to disambiguate that.)

      was (Author: jbellis):
    bq. what does `MARSHAL AS' do here?

It tells it how to turn column names into byte[]:
{code}SELECT 12345678-1234-5678-1234-567812345678 MARSHAL AS TimeUuid FROM timeline WHERE key = ...{code}

bq. As far as get_count() and multiget_count go

+1.  Although this points out that we should probably not overload COUNT as column limit too.  Maybe revise <COLUMNS> to

{code}<CDL>|(REVERSED? FIRST <N> <SLICE>) [MARSHAL AS <TYPE>]{code}
  
> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

In reply to comment #9:
> Is the plan to just return Avro Columns, to annotate those with types, and/or
> actually convert the names and values to a type before returning them? (The
> types would come either from meta-data on the server or conversions specified in
> the query.)

Ultimately I think the best result is to return the proper type, but Avro isn't going to make this easy since we're expected to create that schema up-front.  This is one of the reasons I've stated my desire to (in a future version) create our own wire protocol, so that we could annotate the results with type information.

In the short term, one option would be to add result encoders to the drivers that converted the results based on the column family configuration.

> In the latter two cases, the language needs to have syntax to specify
> conversions  in both directions (names and values to bytes and bytes to names
> and values in results).

Yeah, I don't think I'm a fan of this, (and at least not for 1.0).  Under what circumstances would you even want to encode a result to a type that was different than the one used to validate and/or sort it for storage? 


> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

This is definitely better than what I came up with when I was trying to be as-SQL-as-possible.

bq. Note that a bare "AS" is a SQL keyword legal in column-specification clauses to change the name in the resultset, so I used MARSHAL AS to disambiguate. I think this is the weakest part of this proposal and improvement can probably be made there. (WITH is another possibility – also a SQL keyword, but a more obscure one, and not AFAIK legal in the column-specification clause so would be unambiguous. NAMES AS might also work.)

So, what does `MARSHAL AS' do here?  Does it tell the node to use a different comparator for sorting, or is it the expectation that clients would use this to type the results?

bq. One point of clarification: how does <EXPRESSION> not count as support for indexes?

Well, mostly I just meant that in general the current implementation didn't support indexes.  Right now, an expression consists of AND'd relations where the relations compare a term to either KEY or COLUMN. Indexes would just require allowing a term on the left and right side of the relational operator, the column name would be the term on the left side.

{code:SQL}
... WHERE KEY > "aaa" AND KEY < "ddd" AND "temperature" > 80 ...
{code}

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

The attached patches (v2-*) should cover the syntax and semantics discussed. Comments welcome.

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v2-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v2-0003-make-avro-exception-factory-methods-public.txt, v2-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v2-0005-backfill-missing-system-tests.txt, v2-0006-add-support-for-index-scans.txt, v2-0007-support-empty-unset-where-clause.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment:     (was: CQL.html)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment: CQL.html

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: CQL.html, v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment:     (was: v2-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt)

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Jonathan Ellis commented on CASSANDRA-1704:
-------------------------------------------

bq. what does `MARSHAL AS' do here?

It tells it how to turn column names into byte[]:
{code}SELECT 12345678-1234-5678-1234-567812345678 MARSHAL AS TimeUuid FROM timeline WHERE key = ...{code}

bq. As far as get_count() and multiget_count go

+1.  Although this points out that we should probably not overload COUNT as column limit too.  Maybe revise <COLUMNS> to

{code}<CDL>|(REVERSED? FIRST <N> <SLICE>) [MARSHAL AS <TYPE>]{code}

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (CASSANDRA-1704) CQL reads (aka SELECT)

Posted by "Eric Evans (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-1704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Evans updated CASSANDRA-1704:
----------------------------------

    Attachment: v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v1-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Pavel Yaskevich commented on CASSANDRA-1704:
--------------------------------------------

This looks good to me.

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Jonathan Ellis commented on CASSANDRA-1704:
-------------------------------------------

My suggestion to add full support for column predicates and make it more of a disjoint set with SQL:

{code}SELECT <COLUMNS> FROM <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [LIMIT <X>] [ASC|DESC{code}

Where the main change is the COLUMNS clause which looks like
{code}REVERSED? <CDL>|<SLICE> [MARSHAL AS <TYPE>] [COUNT <Y>]{code}

Where
*<CDL> is a SQL-style comma-delimited list of names
*<TYPE> is a hint saying how to convert the text column names into byte[] (usually only necessary if the comparator is BytesType)
*<SLICE> is a <START>..<END> pair
*COUNT replaces COLLIMIT

Note that a bare "AS" is a SQL keyword legal in column-specification clauses to change the name in the resultset, so I used MARSHAL AS to disambiguate.  I think this is the weakest part of this proposal and improvement can probably be made there.  (WITH is another possibility -- also a SQL keyword, but a more obscure one, and not AFAIK legal in the column-specification clause so would be unambiguous.  NAMES AS might also work.) 

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (CASSANDRA-1704) CQL reads (aka SELECT)

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

Eric Evans commented on CASSANDRA-1704:
---------------------------------------

The most recent patchset adds count support.  Feedback is appreciated.

> CQL reads (aka SELECT)
> ----------------------
>
>                 Key: CASSANDRA-1704
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1704
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API
>    Affects Versions: 0.8
>            Reporter: Eric Evans
>            Assignee: Eric Evans
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: v3-0001-CASSANDRA-1704.-doc-update-for-proposed-SELECT.txt, v3-0002-refactor-CQL-SELECT-to-be-more-SQLish.txt, v3-0003-make-avro-exception-factory-methods-public.txt, v3-0004-wrap-AvroRemoteExceptions-in-CQLExcpetions.txt, v3-0005-backfill-missing-system-tests.txt, v3-0006-add-support-for-index-scans.txt, v3-0007-support-empty-unset-where-clause.txt, v3-0008-SELECT-COUNT-.-FROM-support.txt
>
>   Original Estimate: 0h
>  Remaining Estimate: 0h
>
> Data access specification and implementation for CQL.  
> This corresponds to the following RPC methods:
> * get()
> * get_slice()
> * get_count()
> * multiget_slice()
> * multiget_count()
> * get_range_slices()
> * get_indexed_slices()
> The initial check-in to trunk/ uses a syntax that looks like:
> {code:SQL}
> SELECT (FROM)? <CF> [USING CONSISTENCY.<LVL>] WHERE <EXPRESSION> [ROWLIMIT X] [COLLIMIT Y] [ASC|DESC]
> {code}
> Where:
> * <CF> is the column family name.
> * <EXPRESSION> consists of relations chained by the AND keyword.
> * <LVL> corresponds to one of the enum values in the RPC interface(s).
> What is still undone:
> * Support for indexes
> * Counts
> * Complete test coverage
> And of course, all of this is still very much open to further discussion.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.