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

COPY TO command doesn't escape single quote in collections

Agile BoardAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskMoveLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment