[ 
https://issues.apache.org/jira/browse/CASSANDRA-11633?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15255902#comment-15255902
 ] 

Stefania commented on CASSANDRA-11633:
--------------------------------------

+1

Patch backported and merged to all branches that require it:

||2.1||2.2||3.0||trunk||
|[patch|https://github.com/stef1927/cassandra/commits/11633-2.1]|[patch|https://github.com/stef1927/cassandra/commits/11633-2.2]|[patch|https://github.com/stef1927/cassandra/commits/11633-3.0]|[patch|https://github.com/stef1927/cassandra/commits/11633]|
|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11633-2.1-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11633-2.2-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11633-3.0-dtest/]|[dtest|http://cassci.datastax.com/view/Dev/view/stef1927/job/stef1927-11633-dtest/]|

CI pending.

Here is also a new dtest to reproduce this problem: 
https://github.com/riptano/cassandra-dtest/pull/950

If CI is OK and [~snazy] you are also +1, we can commit this.

> cqlsh COPY FROM fails with []{} chars in UDT/tuple fields/values
> ----------------------------------------------------------------
>
>                 Key: CASSANDRA-11633
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11633
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Robert Stupp
>            Assignee: Robert Stupp
>            Priority: Minor
>              Labels: cqlsh
>             Fix For: 2.1.x, 2.2.x, 3.0.x, 3.x
>
>
> Assuming you have a table with a UDT and the import CSV line looks like this:
> {code}
> ff92ee2f-2aa1-4008-bba7-5600112233b9,"{udt_field: 'N[24-26', other_field: 
> '24', more_data: '}",,some,more,data,follows
> {code}
> cqlsh COPY FROM raises {{IndexError: tuple index out of range}} with a 
> traceback like this:
> {code}
>   File 
> "/Users/snazy/devel/cassandra/trunk/bin/../pylib/cqlshlib/copyutil.py", line 
> 2271, in make_prepared_batch_statement
>     statement._statements_and_parameters = [(True, query.query_id, 
> query.bind(r).values) for r in batch['rows']]
>   File 
> "/Users/snazy/devel/cassandra/trunk/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/query.py",
>  line 411, in bind
>     return BoundStatement(self).bind(values)
>   File 
> "/Users/snazy/devel/cassandra/trunk/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/query.py",
>  line 531, in bind
>     self.values.append(col_spec.type.serialize(value, proto_version))
>   File 
> "/Users/snazy/devel/cassandra/trunk/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cqltypes.py",
>  line 686, in serialize
>     return cls.serialize_safe(val, protocol_version)
>   File 
> "/Users/snazy/devel/cassandra/trunk/bin/../lib/cassandra-driver-internal-only-3.0.0-6af642d.zip/cassandra-driver-3.0.0-6af642d/cassandra/cqltypes.py",
>  line 906, in serialize_safe
>     item = val[i]
> {code}
> Reason is in {{ImportConversion._get_converter.split}} that accidentally 
> recognizes square and curly brackets in quoted strings. Attached patch should 
> fix this issue.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to