[ 
https://issues.apache.org/jira/browse/CASSANDRA-14632?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Brandon Williams updated CASSANDRA-14632:
-----------------------------------------
    Resolution:     (was: Cannot Reproduce)
        Status: Open  (was: Resolved)

100% repros on 3.11:

{noformat}
[cqlsh 5.0.1 | Cassandra 3.11.15-SNAPSHOT | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
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) 
);
InvalidRequest: Error from server: code=2200 [Invalid query] message="No 
keyspace has been specified. USE a keyspace, or explicitly specify 
keyspace.tablename"
cqlsh> use test;
cqlsh:test> CREATE TABLE test ( one text, two int, three text, PRIMARY KEY 
(one,two) );
cqlsh:test> CREATE CUSTOM INDEX ON test.test (three) USING 
'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = { 'delimiter': '░'};

Warnings :
SASI indexes are experimental and are not recommended for production use.

cqlsh:test> DESCRIBE KEYSPACE test ;

'ascii' codec can't decode byte 0xe2 in position 31: ordinal not in range(128)
cqlsh:test> 
{noformat}

> 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: Legacy/Tools
>            Reporter: Michael Semb Wever
>            Priority: Normal
>
> 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
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to