[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14169578#comment-14169578 ] Mikhail Stepura commented on CASSANDRA-8021: [~rnamboodiri] go ahead and create a patch for 2.0.x. There is no need for a separate patch for the trunk > 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 >Assignee: Rajanarayanan Thottuvaikkatumana >Priority: Minor > Labels: cqlsh, lhf > Fix For: 2.0.11, 2.1.1 > > Attachments: cassandra-2.1.1-8021.txt > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14169138#comment-14169138 ] Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8021: - Should I go ahead and generate the patch for the 2.0.11 branch as well? One question for the same changes for the trunk. Is the trunk update going to be taken care of by the merges from the other release branches such as 2.1.1 OR do we have to generate patch like this for the trunk as well? Please clarify. Thanks > 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 >Assignee: Rajanarayanan Thottuvaikkatumana >Priority: Minor > Labels: cqlsh, lhf > Fix For: 2.0.11, 2.1.1 > > Attachments: cassandra-2.1.1-8021.txt > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14164907#comment-14164907 ] Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8021: - The suggested changes have been done and the new patch is attached with this. The old patch has been removed to avoid confusion. This patch is for the 2.1.1 branch and once this is certified, I will upload the patch for the other branch. Thanks Raj > 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 >Assignee: Rajanarayanan Thottuvaikkatumana >Priority: Minor > Labels: cqlsh, lhf > Fix For: 2.0.11, 2.1.1 > > Attachments: cassandra-2.1.1-8021.txt > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14164700#comment-14164700 ] Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8021: - I will make the necessary changes and re-upload the patch. Thanks Raj > 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 >Assignee: Rajanarayanan Thottuvaikkatumana >Priority: Minor > Labels: cqlsh, lhf > Fix For: 2.0.11, 2.1.1 > > Attachments: cassandra-2.1-8021.txt > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14164161#comment-14164161 ] Mikhail Stepura commented on CASSANDRA-8021: I believe we don't need a new completer there. Adding a {{wat}} to {{alterKeyspaceStatement}} should be enough > 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 >Assignee: Rajanarayanan Thottuvaikkatumana >Priority: Minor > Labels: cqlsh, lhf > Fix For: 2.0.11, 2.1.1 > > Attachments: cassandra-2.1-8021.txt > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14163696#comment-14163696 ] Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8021: - Once this submitted patch is working as per the expectations in 2.1.1, then I will make the changes in the 2.0.11 version as well and submit the patch. > 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 >Assignee: Rajanarayanan Thottuvaikkatumana >Priority: Minor > Labels: cqlsh, lhf > Fix For: 2.0.11, 2.1.1 > > Attachments: cassandra-2.1-8021.txt > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14163678#comment-14163678 ] Philip Thompson commented on CASSANDRA-8021: I've marked the status as "Patch Available" and set Tyler as the reviewer. He'll let you know if wants any changes. Thanks for the contribution. > 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 >Assignee: Rajanarayanan Thottuvaikkatumana >Priority: Minor > Labels: cqlsh, lhf > Fix For: 2.0.11, 2.1.1 > > Attachments: cassandra-2.1-8021.txt > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14163522#comment-14163522 ] Philip Thompson commented on CASSANDRA-8021: Can you attach this as a patch to this JIRA according to these instructions:http://wiki.apache.org/cassandra/HowToContribute > 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 >Assignee: Rajanarayanan Thottuvaikkatumana >Priority: Minor > Labels: cqlsh, lhf > Fix For: 2.0.11, 2.1.1 > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14163477#comment-14163477 ] Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8021: - Here is the code snippet that does the job for in the version 2.1.1. Please let me know whether this the job. {code:title=cql3handline.py|borderStyle=solid} syntax_rules += r''' ::= "ALTER" wat=( "KEYSPACE" | "SCHEMA" ) ks= "WITH" ( "AND" )* ; ''' @completer_for('alterKeyspaceStatement', 'wat') def alter_ks_wat_completer(ctxt, cass): # would prefer to get rid of the "schema" nomenclature in cql3 if ctxt.get_binding('partial', '') == '': return ['KEYSPACE'] return ['KEYSPACE', 'SCHEMA'] {code} > 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 >Assignee: Rajanarayanan Thottuvaikkatumana >Priority: Minor > Labels: cqlsh, lhf > Fix For: 2.0.11, 2.1.1 > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14162471#comment-14162471 ] Philip Thompson commented on CASSANDRA-8021: I was looking at the code for 2.1.1. In the current HEAD of the 2.0 branch, the alter keyspace statement syntax rules start at line 995. > 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, 2.1.1 > > > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14162467#comment-14162467 ] Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8021: - Hi Philip, Since this fix has to go in the 2.0.11 version, I have pulled the code from the 2.0 branch. You have mentioned that "syntax rules for the alter keyspace statement are at lines 1088 to 1092 in cql3handline.py". But I see something else there. Am I looking at a different version of the file? Please clarify. > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14162177#comment-14162177 ] Philip Thompson commented on CASSANDRA-8021: Also, you can feel free to work on a patch without being assigned. > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14162175#comment-14162175 ] Philip Thompson commented on CASSANDRA-8021: Ask for permission in the #cassandra-dev room on freenode. > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14162163#comment-14162163 ] Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8021: - Thanks for the quick response. I am not able to assign this ticket to myself. Is there any permission that I need to get to do this? Thanks Raj > 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ 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''' ::= "ALTER" ( "KEYSPACE" | "SCHEMA" ) ks= "WITH" ( "AND" )* ; ''' {code} The problem is that cqlsh is very bad at autocompleting embedded grammar items, in this case , 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)
[jira] [Commented] (CASSANDRA-8021) Improve cqlsh autocomplete for alter keyspace
[ https://issues.apache.org/jira/browse/CASSANDRA-8021?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14162145#comment-14162145 ] Rajanarayanan Thottuvaikkatumana commented on CASSANDRA-8021: - I would like to take up this and if I am not wrong, the changes are to be done in cql3handling.py file. Please correct me if I am wrong. In the regular CQL prompt in a shell, I am not able to see the autocomplete in action. Can somebody tell me how to test this? Thanks Raj > 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)