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

COPY TO command doesn't escape single quote in collections

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.13, 2.0.4
    • Legacy/Tools
    • None
    • Cassandra 2.0.1, Linux

    • 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

            mishail Mikhail Stepura
            IvanMykhailov Ivan Mykhailov
            Mikhail Stepura
            Aleksey Yeschenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: