[
https://issues.apache.org/jira/browse/CASSANDRA-16400?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Adam Holmberg updated CASSANDRA-16400:
--------------------------------------
Description:
cqlsh fails to describe types with non-ascii characters. This is specific to
Python 2 and does not occur in Python 3 (only tested on trunk so far).
{code}
CREATE TYPE ks."ࠑ " (
v int
);
{code}
{noformat}
aholmberg-rmbp16:cassandra adamholmberg$ pyenv shell 2.7.17
aholmberg-rmbp16:cassandra adamholmberg$ bin/cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 4.0-beta4-SNAPSHOT | CQL spec 3.4.5 | Native protocol
v4]
Use HELP for help.
cqlsh> desc types;
Traceback (most recent call last):
File "/Users/adamholmberg/code/cassandra/bin/cqlsh.py", line 1391, in
do_describe
self.describe_list(result)
File "/Users/adamholmberg/code/cassandra/bin/cqlsh.py", line 1438, in
describe_list
names.append(str(row['name']))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0811' in position
1: ordinal not in range(128)
{noformat}
3.11 appears to handle everything properly.
was:
cqlsh fails to describe types with non-ascii characters. This is specific to
Python 2 and does not occur in Python 3 (only tested on trunk so far).
{code}
CREATE TYPE ks."ࠑ " (
v int
);
{code}
{noformat}
aholmberg-rmbp16:cassandra adamholmberg$ pyenv shell 2.7.17
aholmberg-rmbp16:cassandra adamholmberg$ bin/cqlsh
Connected to Test Cluster at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 4.0-beta4-SNAPSHOT | CQL spec 3.4.5 | Native protocol
v4]
Use HELP for help.
cqlsh> desc types;
Traceback (most recent call last):
File "/Users/adamholmberg/code/cassandra/bin/cqlsh.py", line 1391, in
do_describe
self.describe_list(result)
File "/Users/adamholmberg/code/cassandra/bin/cqlsh.py", line 1438, in
describe_list
names.append(str(row['name']))
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0811' in position
1: ordinal not in range(128)
{noformat}
3.0.x is broken in a different way, regardless of what characters are in the
name:
{noformat}
cqlsh> create type ks.x ( v int );
cqlsh> desc types;
Keyspace system_schema
----------------------
<empty>
Keyspace system_auth
--------------------
<empty>
Keyspace system
---------------
<empty>
Keyspace ks
-----------
list[i] not a string for i in 0
{noformat}
3.11 appears to handle everything properly.
> cqlsh cannot DESC TYPE with non-ascii character in the identifier
> -----------------------------------------------------------------
>
> Key: CASSANDRA-16400
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16400
> Project: Cassandra
> Issue Type: Bug
> Components: Tool/cqlsh
> Reporter: Adam Holmberg
> Assignee: Adam Holmberg
> Priority: Normal
> Fix For: 3.0.x, 4.0.x
>
>
> cqlsh fails to describe types with non-ascii characters. This is specific to
> Python 2 and does not occur in Python 3 (only tested on trunk so far).
> {code}
> CREATE TYPE ks."ࠑ " (
> v int
> );
> {code}
> {noformat}
> aholmberg-rmbp16:cassandra adamholmberg$ pyenv shell 2.7.17
> aholmberg-rmbp16:cassandra adamholmberg$ bin/cqlsh
> Connected to Test Cluster at 127.0.0.1:9042.
> [cqlsh 5.0.1 | Cassandra 4.0-beta4-SNAPSHOT | CQL spec 3.4.5 | Native
> protocol v4]
> Use HELP for help.
> cqlsh> desc types;
> Traceback (most recent call last):
> File "/Users/adamholmberg/code/cassandra/bin/cqlsh.py", line 1391, in
> do_describe
> self.describe_list(result)
> File "/Users/adamholmberg/code/cassandra/bin/cqlsh.py", line 1438, in
> describe_list
> names.append(str(row['name']))
> UnicodeEncodeError: 'ascii' codec can't encode character u'\u0811' in
> position 1: ordinal not in range(128)
> {noformat}
> 3.11 appears to handle everything properly.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]