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

DESCRIBE KEYSPACE does not properly quote table names

    XMLWordPrintableJSON

Details

    Description

      How to reproduce (3.11.6) - cqlsh:

      CREATE KEYSPACE test1 WITH replication = \{'class': 'SimpleStrategy', 'replication_factor': '1'} AND durable_writes = true;
      CREATE TABLE test1."default" (id text PRIMARY KEY, data text, etag text);
      DESCRIBE KEYSPACE test1;
      

      Output will be:

      CREATE TABLE test1.default (
       id text PRIMARY KEY,
       data text,
       etag text
      ) WITH [..]
      

      Output should be:

      CREATE TABLE test1."default" (
       id text PRIMARY KEY,
       data text,
       etag text
      ) WITH [..]
      

       If you try to run CREATE TABLE test1.default [..] you will get an error

      SyntaxException: line 1:19 no viable alternative at input 'default' (CREATE TABLE test1.[default]...)

      Oskar Liljeblad

       

      Attachments

        Issue Links

          Activity

            People

              Gerrrr Alex Sorokoumov
              oskar3215 Oskar Liljeblad
              Alex Sorokoumov
              Andres de la Peña, Ekaterina Dimitrova
              Votes:
              0 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m