CREATE TABLE list_map_set_1 (
id int,
list1 list<int>,
map1 map<int,text>,
set1 set<uuid>,
PRIMARY KEY(id)
) WITH
"bloom_filter_fp_chance"='0.01' AND "caching"='KEYS_ONLY' AND "dclocal_read_repair_chance"='0.0' AND "gc_grace_seconds"='864000' AND "read_repair_chance"='0.1' AND "replicate_on_write"='true'
AND compaction = {'class':'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression':'SnappyCompressor'}
CREATE TABLE list_map_set_2 (
id int,
list1 list<int>,
map1 map<int,text>,
set1 set<uuid>,
PRIMARY KEY(id)
) WITH
"bloom_filter_fp_chance"='0.01' AND "caching"='KEYS_ONLY' AND "dclocal_read_repair_chance"='0.0' AND "gc_grace_seconds"='864000' AND "read_repair_chance"='0.1' AND "replicate_on_write"='true'
AND compaction = {'class':'SizeTieredCompactionStrategy'}
AND compression = {'sstable_compression':'SnappyCompressor'}
INSERT INTO list_map_set_1 (id, list1, map1, set1)
VALUES(1, [101,201,301], {1:'cassandra'}, {01234567-0123-0123-0123-0123456789ab})
GO
INSERT INTO list_map_set_1 (id, list1, map1, set1)
VALUES(2, [102,201,301], {1:'hive'}, {01234567-0123-0123-0123-0123456789ab})
GO
INSERT INTO list_map_set_1 (id, list1, map1, set1)
VALUES(3, [103,201,301], {1:'mongo'}, {01234567-0123-0123-0123-0123456789ab})
GO
INSERT INTO list_map_set_1 (id, list1, map1, set1)
VALUES(4, [104,201,301], {1:'tariq'}, {01234567-0123-0123-0123-0123456789ab})
GO
INSERT INTO list_map_set_1 (id, list1, map1, set1)
VALUES(5, [105,201,301], {1:'sahil'}, {01234567-0123-0123-0123-0123456789ab})
GO
INSERT INTO list_map_set_1 (id, list1, map1, set1)
VALUES(6, [106,201,301], {1:'asif'}, {01234567-0123-0123-0123-0123456789ab})
GO
INSERT INTO list_map_set_1 (id, list1, map1, set1)
VALUES(7, [107,201,301], {1:'jon'}, {01234567-0123-0123-0123-0123456789ab})
GO
java.sql.SQLSyntaxErrorException: Invalid list literal for list1: value '101' is not of type int
'INSERT INTO "cass"."list_map_set_imp"("id", "list1", "map1", "set1") VALUES(5, ['101', '201', '301'], {'1':'cassandra'}, {'01234567-0123-0123-0123-0123456789ab'})'
at org.apache.cassandra.cql.jdbc.CassandraStatement.doExecute(Unknown Source)
at org.apache.cassandra.cql.jdbc.CassandraStatement.executeUpdate(Unknown Source)
at \\...\\ .\\हिñçêČάй語简??한\\.Kꎸᛗꅁꇊ transient.executeUpdate(Unknown Source)
at \\...\\ .\\हिñçêČάй語简??한\\.Rᛃᡱ̈ꀌ.process(Unknown Source)
at \\...\\ .\\हिñçêČάй語简??한\\.Rᛃᡱ̈ꀌ.run(Unknown Source)
Caused by: InvalidRequestException(why:Invalid list literal for list1: value '101' is not of type int)
at org.apache.cassandra.thrift.Cassandra$execute_cql3_query_result.read(Cassandra.java:37849)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:78)
at org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql3_query(Cassandra.java:1562)
at org.apache.cassandra.thrift.Cassandra$Client.execute_cql3_query(Cassandra.java:1547)
at org.apache.cassandra.cql.jdbc.CassandraConnection.execute(Unknown Source)
at org.apache.cassandra.cql.jdbc.CassandraConnection.execute(Unknown Source)
... 5 more
This problem is similar to the one described in issue 10161.
On 1.2.1 server, values of number and boolean data types can be quoted using single quotes and server will accept them; on 1.2.3+ server, these values will be rejected if they are quoted.
Fixed:
14.0 - SVN r34340/14.0.0-rc-46
trunk - SVN r34341/15.0.0-dev-22
Import, export, and schema generator should work now (still have problem to deal with blob data type, thought). Table data editor yet to be fixed, logged as issue 10346.
Fixed:
14.0 - SVN r34340/14.0.0-rc-46
trunk - SVN r34341/15.0.0-dev-22
Import, export, and schema generator should work now (still have problem to deal with blob data type, thought). Table data editor yet to be fixed, logged as issue 10346.
Issue #10345 |
Closed |
Fixed |
Resolved |
Completion |
No due date |
Fixed Build 14.0.0-rc-46/15.0.0-dev-22 |
No time estimate |
1 issue link |
relates to #10346
Issue #10346Cassandra - Table data editor - values of NUMBER/BLOB/BOOLEAN/UUID data types are quoted in collections |
This problem is similar to the one described in issue 10161.
On 1.2.1 server, values of number and boolean data types can be quoted using single quotes and server will accept them; on 1.2.3+ server, these values will be rejected if they are quoted.