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

COPY TO command doesn't escape single quote in collections

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Fixed
    • Fix Version/s: 1.2.13, 2.0.4
    • Component/s: Legacy/Tools
    • Labels:
      None
    • Environment:

      Cassandra 2.0.1, Linux

    • Severity:
      Low

      Description

      CREATE TABLE test (key text PRIMARY KEY , testcollection set<text>) ;
      INSERT INTO test (key, testcollection ) VALUES ( 'test', {'foo''bar'});
      COPY test TO '/tmp/test.csv';
      COPY test FROM '/tmp/test.csv';
      
      Bad Request: line 1:73 mismatched character '<EOF>' expecting '''
      Aborting import at record #0 (line 1). Previously-inserted values still present.
      

      Content of generated '/tmp/test.csv':

      test,{'foo'bar'}
      

      Unfortunately, I didn't find workaround with any combination of COPY options

        Attachments

        1. CASSANDRA-2.0-6172.patch
          0.9 kB
          Mikhail Stepura

          Activity

            People

            • Assignee:
              mishail Mikhail Stepura
              Reporter:
              IvanMykhailov Ivan Mykhailov
              Authors:
              Mikhail Stepura
              Reviewers:
              Aleksey Yeschenko
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: