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

Stefania commented on CASSANDRA-12959:
--------------------------------------

Thank you for the review! :)

bq. I'm a bit impressed parsing 'first_field' to frozen<set<text>> did not 
error out, but was actually parsed as {'irst_fiel'}, is this something we 
should look into (maybe in a separate ticket)?

I've created CASSANDRA-13071 for this.

bq. oops, I missed your earlier comment about 2.1 dtests not running. 

The cqlsh tests do not run, but I did run the full dtests, which include cqlsh 
dtests but not cqlshlib tests and do not test cython. I think this is safe 
enough for this patch (we never run cqlshlib tests for 2.1, not even on the 
main branches).

I will commit shortly.

> copy from csv import wrong values with udt having set when fields are not 
> specified in correct order in csv
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-12959
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-12959
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Tools
>            Reporter: Quentin Ambard
>            Assignee: Stefania
>             Fix For: 2.1.x, 2.2.x, 3.0.x, 3.x
>
>
>  {quote}
> create KEYSPACE test WITH replication = \{ 'class': 'SimpleStrategy', 
> 'replication_factor': 1\};
> CREATE TYPE test.my_udt (
>     first_field text,
>     second_field frozen<set<text>>
> );
> CREATE TABLE test.test ( key text, value my_udt, PRIMARY KEY (key));
> {quote}
> The following works as expected : 
> {quote}
> INSERT INTO test.test (key , value ) VALUES ( 'key1', \{second_field: 
> \{'test1', 'test2'\}, first_field: 'first_field'\});
>  key  | value
> ------+----------------------------------------------------------------
>  key1 | \{first_field: 'first_field', second_field: \{'test1', 'test2'\}\}
> {quote}
> but when inserted using a .csv the result is wrong:
> {quote}"key1","\{second_field: \{'test1', 'test2'\}, first_field: 
> 'first_field'\}"
> COPY test.test FROM '~/test.csv';
>  key  | value
> ------+----------------------------------------------------------------------
>  key1 | \{first_field: '\{''test1'', ''test2''\}', second_field: 
> \{'irst_fiel'\}\}
> {quote}
> it works as expected if the keys are in order: 
> bq. "key1","\{first_field: 'first_field', second_field: \{'test1', 
> 'test2'\}\}")



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

Reply via email to