[
https://issues.apache.org/jira/browse/CASSANDRA-13071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15880271#comment-15880271
]
Stefania commented on CASSANDRA-13071:
--------------------------------------
Patch is ready [~pauloricardomg]:
||3.0||3.11||trunk||
|[patch|https://github.com/stef1927/cassandra/tree/13071-cqlsh-3.0]|[patch|https://github.com/stef1927/cassandra/tree/13071-cqlsh-3.11]|[patch|https://github.com/stef1927/cassandra/tree/13071-cqlsh]|
|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13071-cqlsh-3.0-cqlsh-tests/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13071-cqlsh-3.11-cqlsh-tests/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-13071-cqlsh-cqlsh-tests/]|
Tests are [here|https://github.com/riptano/cassandra-dtest/pull/1448].
> cqlsh copy-from should error out when csv contains invalid data for
> collections
> -------------------------------------------------------------------------------
>
> Key: CASSANDRA-13071
> URL: https://issues.apache.org/jira/browse/CASSANDRA-13071
> Project: Cassandra
> Issue Type: Bug
> Components: Tools
> Reporter: Stefania
> Assignee: Stefania
> Priority: Minor
> Fix For: 3.0.x, 3.11.x
>
>
> If the csv file contains invalid data for collection types, at the moment the
> data is imported incorrectly, an error would be a better behavior.
> For example this table:
> {code}
> CREATE TABLE test.test (key text, value frozen<set<text>>, PRIMARY KEY
> (key));
> {code}
> with this data:
> {code}
> "key1","{'test1', 'test2'}"
> "Key2","not_a_set"
> {code}
> will be imported by {{COPY test.test FROM 'test.csv';}} without errors but
> will result in the following data:
> {code}
> cqlsh> select * from test.test;
> key | value
> ------+--------------------
> key1 | {'test1', 'test2'}
> Key2 | {'ot_a_se'}
> (2 rows)
> {code}
> The second row should have been rejected. The reason is that the [{{split}}
> function|https://github.com/stef1927/cassandra/blob/trunk/pylib/cqlshlib/copyutil.py#L1898]
> assumes that the first and last characters of the string passed in are
> parentheses, without actually checking it.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)