mck created CASSANDRA-14632:
-------------------------------

             Summary: cqlsh can't describe when index options contain unicode 
                 Key: CASSANDRA-14632
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14632
             Project: Cassandra
          Issue Type: Bug
          Components: Tools
            Reporter: mck


The following `describe` fails in `cqlsh`:

 
{code:java}
$ cqlsh

cqlsh> CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};

cqlsh> CREATE TABLE test ( one text, two int, three text, PRIMARY KEY (one,two) 
);

cqlsh> CREATE CUSTOM INDEX ON test.test (three) USING 
'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = { 'delimiter': '░'};

cqlsh> DESCRIBE KEYSPACE test ;

'ascii' codec can't decode byte 0xe2 in position 31: ordinal not in range(128)

{code}
 

Full error is 
{noformat}
Traceback (most recent call last):
  File "/usr/bin/cqlsh.py", line 919, in onecmd
    self.handle_statement(st, statementtext)
  File "/usr/bin/cqlsh.py", line 956, in handle_statement
    return custom_handler(parsed)
  File "/usr/bin/cqlsh.py", line 1539, in do_describe
    self.describe_keyspace(ksname)
  File "/usr/bin/cqlsh.py", line 1275, in describe_keyspace
    self.print_recreate_keyspace(self.get_keyspace_meta(ksname), sys.stdout)
  File "/usr/bin/cqlsh.py", line 1225, in print_recreate_keyspace
    out.write(ksdef.export_as_string())
  File 
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.10.zip/cassandra-driver-3.10/cassandra/metadata.py",
 line 661, in export_as_string
    + [t.export_as_string() for t in self.tables.values()])
  File 
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.10.zip/cassandra-driver-3.10/cassandra/metadata.py",
 line 1116, in export_as_string
    ret = self._all_as_cql()
  File 
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.10.zip/cassandra-driver-3.10/cassandra/metadata.py",
 line 1125, in _all_as_cql
    ret += "\n%s;" % index.as_cql_query()
  File 
"/usr/share/cassandra/lib/cassandra-driver-internal-only-3.10.zip/cassandra-driver-3.10/cassandra/metadata.py",
 line 1402, in as_cql_query
    ret += " WITH OPTIONS = %s" % 
Encoder().cql_encode_all_types(options){noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to