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)

Reply via email to