[
https://issues.apache.org/jira/browse/CASSANDRA-11549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15236452#comment-15236452
]
Stefania commented on CASSANDRA-11549:
--------------------------------------
The patch is here:
||2.1||2.2||3.0||trunk||
|[patch|https://github.com/stef1927/cassandra/commits/11549-2.1]|[patch|https://github.com/stef1927/cassandra/commits/11549-2.2]|[patch|https://github.com/stef1927/cassandra/commits/11549-3.0]|[patch|https://github.com/stef1927/cassandra/commits/11549]|
|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11549-2.1-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11549-2.2-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11549-3.0-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11549-dtest/]|
Here is a [pull request|https://github.com/riptano/cassandra-dtest/pull/923]
for dtests so that in future we catch this sort of problems.
[~pauloricardomg] could you review? It's a one liner so I've only started CI on
2.1 and trunk, to save resources.
> cqlsh: COPY FROM ignores NULL values in conversion
> --------------------------------------------------
>
> Key: CASSANDRA-11549
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11549
> Project: Cassandra
> Issue Type: Bug
> Components: Tools
> Reporter: Stefania
> Assignee: Stefania
> Fix For: 2.1.x, 2.2.x, 3.0.x, 3.x
>
>
> COPY FROM fails to import empty values.
> For example:
> {code}
> $ cat test.csv
> a,10,20
> b,30,
> c,50,60
> $ cqlsh
> cqlsh> create keyspace if not exists test with replication = {'class':
> 'SimpleStrategy', 'replication_factor':1};
> cqlsh> create table if not exists test.test (t text primary key, i1 int, i2
> int);
> cqlsh> copy test.test (t,i1,i2) from 'test.csv';
> {code}
> Imports:
> {code}
> select * from test.test";
> t | i1 | i2
> ---+----+----
> a | 10 | 20
> c | 50 | 60
> (2 rows)
> {code}
> and generates a {{ParseError - invalid literal for int() with base 10: '',
> given up without retries}} for the row with an empty value.
> It should import the empty value as a {{null}} and there should be no error:
> {code}
> cqlsh> select * from test.test";
> t | i1 | i2
> ---+----+------
> a | 10 | 20
> c | 50 | 60
> b | 30 | null
> (3 rows)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)