Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-16400

cqlsh cannot DESC TYPE with non-ascii character in the identifier

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 4.0-rc2, 4.0
    • Tool/cqlsh
    • None

    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).

      CREATE TYPE ks."ࠑ " (
          v int
      );
      
      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)
      

      3.11 appears to handle everything properly.

      Attachments

        Issue Links

          Activity

            People

              aholmber Adam Holmberg
              aholmber Adam Holmberg
              Adam Holmberg
              Brandon Williams, Ekaterina Dimitrova
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: