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

Philip Thompson commented on CASSANDRA-8021:
--------------------------------------------

If you would like to work on this, please assign yourself to the ticket. You 
are correct that the changes are in cql3handling.py file. While running cqlsh 
you should be able to use tab-completion to access the autocomplete 
functionality.

The current syntax rules for the alter keyspace statement are at lines 1088 to 
1092 in cql3handline.py:
{code}
syntax_rules += r'''
<alterKeyspaceStatement> ::= "ALTER" ( "KEYSPACE" | "SCHEMA" ) 
ks=<alterableKeyspaceName>
                                 "WITH" <property> ( "AND" <property> )*
                           ;
'''
{code}

The problem is that cqlsh is very bad at autocompleting embedded grammar items, 
in this case <property>, which usually will take the form shown above in this 
ticket's description.

> Improve cqlsh autocomplete for alter keyspace
> ---------------------------------------------
>
>                 Key: CASSANDRA-8021
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-8021
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Philip Thompson
>            Priority: Minor
>              Labels: cqlsh, lhf
>             Fix For: 2.0.11
>
>
> Cqlsh autocomplete stops giving suggestions for the statement
> {code}ALTER KEYSPACE k WITH REPLICATION { 'class' : 'SimpleStrategy', 
> 'replication_factor' : 1'};{code} after the word "WITH".



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

Reply via email to