You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Yusuke Takata (JIRA)" <ji...@apache.org> on 2016/06/08 08:21:20 UTC

[jira] [Created] (CASSANDRA-11976) cqlsh tab completion doesn't work in 2.1

Yusuke Takata created CASSANDRA-11976:
-----------------------------------------

             Summary: cqlsh tab completion doesn't work in 2.1
                 Key: CASSANDRA-11976
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11976
             Project: Cassandra
          Issue Type: Bug
          Components: CQL
            Reporter: Yusuke Takata
            Priority: Minor


cqlsh tab completion doesn't work when there are two tables with the same prefix.
I found the similar completion issue at CASSANDRA-10733, but my problem is not fixed by the existing issue in 2.1.
{code}
cqlsh> CREATE KEYSPACE sample_ks WITH replication = {'class': 'SimpleStrategy' , 'replication_factor': 1 };
cqlsh> CREATE TABLE sample_ks.tbl_a ( key text PRIMARY KEY );
cqlsh> CREATE TABLE sample_ks.tbl_b ( key text PRIMARY KEY, value int );

// works correctly
cqlsh> INSERT INTO sample_ks.tb<TAB>
cqlsh> INSERT INTO sample_ks.tbl_

// fix required
cqlsh> INSERT INTO samp<TAB>
cqlsh> INSERT INTO sample_ks.tbl_( 
{code}

Also, completion doesn't work with a single column table.
{code}
cqlsh> CREATE KEYSPACE sample_ks WITH replication = {'class': 'SimpleStrategy' , 'replication_factor': 1 };
cqlsh> CREATE TABLE sample_ks.tbl_a ( key text PRIMARY KEY );
cqlsh> CREATE TABLE sample_ks.tbl_b ( key text PRIMARY KEY, value int );

// fix required (unnecessary comma)
cqlsh> INSERT INTO sample_ks.tbl_a<TAB>
cqlsh> INSERT INTO sample_ks.tbl_a (key,
// fix required (no reaction)
cqlsh> INSERT INTO sample_ks.tbl_a (key) VALU<TAB>
cqlsh> INSERT INTO sample_ks.tbl_a (key) VALU
// fix required (I can't insert only a key.)
cqlsh> INSERT INTO sample_ks.tbl_b<TAB>
cqlsh> INSERT INTO sample_ks.tbl_b (key, value
{code}
I fixed the completion problem in 2.1 branch. Could someone review the attached patch?



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