incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Hood <0x6e6...@gmail.com>
Subject Re: CQL list command
Date Fri, 07 Feb 2014 07:33:49 GMT
On Thu, Feb 6, 2014 at 9:01 PM, Andrew Cobley <a.e.cobley@dundee.ac.uk> wrote:
> I often use the CLI command LIST for debugging or when teaching students showing them
what's going on under the hood of CQL.  I see that CLI swill be removed in Cassandra 3 and
we will lose this ability.  It would be nice if CQL retained it, or something like it for
debugging and etching purposes.

I agree. I use LIST every now and then to verify the storage layout of
partitioning and cluster columns. What would be cool is to do
something like:

cqlsh:y> CREATE TABLE x (
          ...     a int,
          ...     b int,
          ...     c int,
          ...     PRIMARY KEY (a,b)
          ... );
cqlsh:y> insert into x (a,b,c) values (1,1,1);
cqlsh:y> insert into x (a,b,c) values (2,1,1);
cqlsh:y> insert into x (a,b,c) values (2,2,1);
cqlsh:y> select * from x;
 a | b | c
---+---+---
 1 | 1 | 1
 2 | 1 | 1
 2 | 2 | 1

(3 rows)

cqlsh:y> select * from x show storage; // requires monospace font

           +---+
+---+      |b:1|
|a:1| +--> |---|
+---+      |c:1|
           +---+

           +---+---+
+---+      |b:1|b:2|
|a:2| +--> |---|---|
+---+      |c:1|c:2|
           +---+---+

(2 rows)

Mime
View raw message