[ https://issues.apache.org/jira/browse/CASSANDRA-16372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ostico updated CASSANDRA-16372: ------------------------------- Description: Cqlsh fail to import an empty string which is present in a list data type. {color:#ff0000}_In those conditions backups can discard rows and data can be corrupted._{color} *Conditions* {code:java} CREATE TABLE test.test_1 ( uid uuid PRIMARY KEY, texts list<text> ); insert into test.test_1 ( uid, texts ) VALUES( 833fee3f-d4f9-418b-9387-84ac2cda5cb7, ['But if you now try to wash your hands,', ''] ); {code} Now exporting and and re-importing data fails: {code:java} cqlsh> select * from test.test_1; uid | texts --------------------------------------+------------------------------------------------ 833fee3f-d4f9-418b-9387-84ac2cda5cb7 | ['But if you now try to wash your hands,', ''] cqlsh> COPY test.test_1 (uid, texts) TO 'ctm.csv'; Using 7 child processesStarting copy of test.test_1 with columns [uid, texts]. Processed: 1 rows; Rate: 9 rows/s; Avg. rate: 9 rows/s 1 rows exported to 1 files in 0.148 seconds. cqlsh> truncate table test.test_1; cqlsh> COPY test.test_1 (uid, texts) FROM 'ctm.csv'; Using 7 child processes Starting copy of test.test_1 with columns [uid, texts]. Failed to import 1 rows: ParseError - Failed to parse ['But if you now try to wash your hands,', ''] : Empty values are not allowed, given up without retries Failed to process 1 rows; failed rows written to import_test_test_1.err Processed: 1 rows; Rate: 2 rows/s; Avg. rate: 2 rows/s 1 rows imported from 1 files in 0.415 seconds (0 skipped). {code} was: Cqlsh fail to import an empty string which is present in a list data type. {color:#ff0000}_In those conditions backups can discard rows and data can be corrupted._{color} *Conditions* {code:java} CREATE TABLE test.test_1 ( uid uuid PRIMARY KEY, texts list<text> ); insert into test.test_1 ( uid, texts ) VALUES( 833fee3f-d4f9-418b-9387-84ac2cda5cb7, ['But if you now try to wash your hands,', ''] ); {code} Now exporting and and re-importing data fails: {code:java} cqlsh> select * from test.test_1; uid | texts --------------------------------------+------------------------------------------------ 833fee3f-d4f9-418b-9387-84ac2cda5cb7 | ['But if you now try to wash your hands,', ''] cqlsh> COPY test.test_1 (uid, texts) TO 'ctm.csv'; Using 7 child processesStarting copy of test.test_1 with columns [uid, texts]. Processed: 1 rows; Rate: 9 rows/s; Avg. rate: 9 rows/s 1 rows exported to 1 files in 0.148 seconds. cqlsh> truncate table test.test_1; cqlsh> COPY test.test_1 (uid, texts) FROM 'ctm.csv'; Using 7 child processesStarting copy of test.test_1 with columns [uid, texts]. Failed to import 1 rows: ParseError - Failed to parse ['But if you now try to wash your hands,', ''] : Empty values are not allowed, given up without retries Failed to process 1 rows; failed rows written to import_test_test_1.err Processed: 1 rows; Rate: 2 rows/s; Avg. rate: 2 rows/s 1 rows imported from 1 files in 0.415 seconds (0 skipped). {code} > Import from csv of empty strings in list fails with a ParseError: Empty > values are not allowed, given up without retries > ------------------------------------------------------------------------------------------------------------------------- > > Key: CASSANDRA-16372 > URL: https://issues.apache.org/jira/browse/CASSANDRA-16372 > Project: Cassandra > Issue Type: Bug > Components: Legacy/Tools > Reporter: Ostico > Priority: Normal > > > Cqlsh fail to import an empty string which is present in a list data type. > {color:#ff0000}_In those conditions backups can discard rows and data can be > corrupted._{color} > > *Conditions* > > {code:java} > CREATE TABLE test.test_1 ( > uid uuid PRIMARY KEY, > texts list<text> > ); > insert into test.test_1 ( uid, texts ) VALUES( > 833fee3f-d4f9-418b-9387-84ac2cda5cb7, ['But if you now try to wash your > hands,', ''] ); > {code} > > Now exporting and and re-importing data fails: > > {code:java} > cqlsh> select * from test.test_1; > uid | texts > --------------------------------------+------------------------------------------------ > 833fee3f-d4f9-418b-9387-84ac2cda5cb7 | ['But if you now try to wash your > hands,', ''] > cqlsh> COPY test.test_1 (uid, texts) TO 'ctm.csv'; > Using 7 child processesStarting copy of test.test_1 with columns [uid, texts]. > Processed: 1 rows; Rate: 9 rows/s; Avg. rate: 9 rows/s 1 rows exported to 1 > files in 0.148 seconds. > cqlsh> truncate table test.test_1; > cqlsh> COPY test.test_1 (uid, texts) FROM 'ctm.csv'; > Using 7 child processes > Starting copy of test.test_1 with columns [uid, texts]. > Failed to import 1 rows: ParseError - Failed to parse ['But if you now try to > wash your hands,', ''] : Empty values are not allowed, given up without > retries > Failed to process 1 rows; failed rows written to import_test_test_1.err > Processed: 1 rows; Rate: 2 rows/s; Avg. rate: 2 rows/s > 1 rows imported from 1 files in 0.415 seconds (0 skipped). > {code} > > > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org