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

Eric Evans commented on CASSANDRA-1088:
---------------------------------------

I'm seeing a different exception now:

{noformat}
[defa...@keyspace1] list Standard2['a':'zzzz'] limit 10
Exception in thread "main" java.lang.AssertionError
at org.apache.cassandra.cli.CliClient.executeList(CliClient.java:460)
at org.apache.cassandra.cli.CliClient.executeCLIStmt(CliClient.java:97)
at org.apache.cassandra.cli.CliMain.processCLIStmt(CliMain.java:229)
at org.apache.cassandra.cli.CliMain.main(CliMain.java:286)
{noformat}

The failed assertion is:

{noformat}
assert(limitSpec.getType() == CliParser.NODE_LIMIT);
{noformat}

getType() is returning 33 here (corresponds with K_LIMIT), NODE_LIMIT is 18. 
I'll try to look at this further when I get some time.

Also, references to Column.timestamp in your patch need to be updated to 
Column.clock.timestamp due to recent changes in trunk.

Also also, usage docs should be added to the help synopsis.

> Enable cassandra-cli to list rows, and page through rows in a column family
> ---------------------------------------------------------------------------
>
>                 Key: CASSANDRA-1088
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-1088
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Tools
>            Reporter: Frank Du
>             Fix For: 0.7
>
>         Attachments: patch.txt
>
>
> I have been looking for showing rows and paging through rows. Finally I write 
> this extension to cassandra-cli tool. 
> Let's assume that we have the following data in column family named 'CF1':
> =========================
> Row 1:
> key: fdu1, name: 'Frank Du', city: 'NYC'
> Row 2:
> key: fdu2, name: 'Jonathan Ellis'
> Row 3:
> key: fdu3, name: 'Eric Evans'
> Syntax:
> =========================
> LIST keyRangeExpression limitClause?
> keyRangeExpression:
>         columnFamilyName[ startKey : endKey ]  ( [ 'superCoumnName' ] )? 
> limitClause: 
>         LIMIT count (OFFSET offset)? 
>         \| LIMIT offset, count
> The limit clause is the same with MySql.
> Examples:
> =========================
> // list all the 3 rows in CF1
> list CF1[ '' : '' ]    
> // list all rows, offset from index 1. So it will show 2 rows
> list CF1[ '' : '' ] limit 1, 10    
>  // show the rows 'fdu2' and 'fdu3'
> list CF1[ 'fdu2' : '' ] limit 10 

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

Reply via email to