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

Stefania commented on CASSANDRA-7814:
-------------------------------------

The development is pretty much complete, I should be able to submit the patch 
early next week after I've reviewed it one more time myself and double checked 
the tests.

The code (based on 2.1) is here:
patch: https://github.com/stef1927/cassandra/tree/7814
python driver: https://github.com/stef1927/python-driver/tree/7814
dtests: https://github.com/stef1927/cassandra-dtest/tree/7814

We should be able to do things like:

{code}
  DESCRIBE KEYSPACE myks;
  DESCRIBE myks;
  DESCRIBE TABLE myks.mytable;
  DESCRIBE myks.mytable;
  DESCRIBE INDEX myks.myindex;
  DESCRIBE myks.myindex;

  USE myks;
  DESCRIBE TABLE mytable;
  DESCRIBE mytable;
  DESCRIBE INDEX myindex;
  DESCRIBE myindex;
{code}

See the dtest for more details.

For the python driver, I've created a ticket linking it to my branch:
https://datastax-oss.atlassian.net/browse/PYTHON-241

It's not that this functionality cannot be done without changing the driver,
it's just that at the moment it is not very efficient since we need to loop
on all keyspace tables and then for each table we need to loop on all columns
in order to find the index metadata. The same is true for existing functionality
like {{DROP INDEX idxname}} and all the time we complete on commands that 
expect an
index name. So I added a dictionary that maps index names to index metadata.

The patch assumes this new python driver version, for this reason in the patch 
I commented
out the part of the code that loads the driver from the zip file (to be 
reverted before committing).

So we should not commit until the driver has been updated. If driver ticket is 
rejected or is not ready in time
we can always rework the patch to loop on tables and columns.

> enable describe on indices
> --------------------------
>
>                 Key: CASSANDRA-7814
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-7814
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: radha
>            Assignee: Stefania
>            Priority: Minor
>             Fix For: 2.1.4
>
>
> Describe index should be supported, right now, the only way is to export the 
> schema and find what it really is before updating/dropping the index.
> verified in 
> [cqlsh 3.1.8 | Cassandra 1.2.18.1 | CQL spec 3.0.0 | Thrift protocol 19.36.2]



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to