You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Ivan Mykhailov (JIRA)" <ji...@apache.org> on 2013/10/09 12:55:46 UTC

[jira] [Updated] (CASSANDRA-6172) COPY TO command doesn't escape single quote in collections

     [ https://issues.apache.org/jira/browse/CASSANDRA-6172?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ivan Mykhailov updated CASSANDRA-6172:
--------------------------------------

    Description: 
{code}
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.
{code}

Content of generated '/tmp/test.csv':
{code}
test,{'foo'bar'}
{code}

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

  was:
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 


> COPY TO command doesn't escape single quote in collections
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-6172
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6172
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>         Environment: Cassandra 2.0.1, Linux
>            Reporter: Ivan Mykhailov
>
> {code}
> 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.
> {code}
> Content of generated '/tmp/test.csv':
> {code}
> test,{'foo'bar'}
> {code}
> Unfortunately, I didn't find workaround with any combination of COPY options 



--
This message was sent by Atlassian JIRA
(v6.1#6144)