[
https://issues.apache.org/jira/browse/CASSANDRA-3783?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13622445#comment-13622445
]
Aleksey Yeschenko commented on CASSANDRA-3783:
----------------------------------------------
INSERT/UPDATE work, but I think we should return better error messages when
users include nulls in lists/sets and map keys/values in inserts, in collection
literals.
{noformat}
insert into demo (id1, id2, alist) values (0, '1', [1,2,3,null]);
Bad Request: Invalid list literal for alist: nested collections are not
supported
text could not be lexed at line 1, char 52
insert into demo (id1, id2, amap) values (0, '1', {'0':'0', '1':'1',null:'2'});
Bad Request: Invalid map literal for amap: nested collections are not supported
text could not be lexed at line 1, char 51
insert into demo (id1, id2, amap) values (0, '1', {'0':'0', '1':'1','2':null});
Bad Request: Invalid map literal for amap: nested collections are not supported
text could not be lexed at line 1, char 51
insert into demo (id1, id2, aset) values (0, '1', {'1', '2', null});
Bad Request: Invalid set literal for aset: nested collections are not supported
text could not be lexed at line 1, char 51
{noformat}
Other than that LGTM.
> Add 'null' support to CQL 3.0
> -----------------------------
>
> Key: CASSANDRA-3783
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3783
> Project: Cassandra
> Issue Type: Sub-task
> Components: API
> Reporter: Sylvain Lebresne
> Assignee: MichaĆ Michalski
> Priority: Minor
> Labels: cql3
> Fix For: 1.2.4
>
> Attachments: 3783-v2.patch, 3783-v3.patch, 3783-v4.txt,
> 3783-wip-v1.patch
>
>
> Dense composite supports adding records where only a prefix of all the
> component specifying the key is defined. In other words, with:
> {noformat}
> CREATE TABLE connections (
> userid int,
> ip text,
> port int,
> protocol text,
> time timestamp,
> PRIMARY KEY (userid, ip, port, protocol)
> ) WITH COMPACT STORAGE
> {noformat}
> you can insert
> {noformat}
> INSERT INTO connections (userid, ip, port, time) VALUES (2, '192.168.0.1',
> 80, 123456789);
> {noformat}
> You cannot however select that column specifically (i.e, without selecting
> column (2, '192.168.0.1', 80, 'http') for instance).
> This ticket proposes to allow that though 'null', i.e. to allow
> {noformat}
> SELECT * FROM connections WHERE userid = 2 AND ip = '192.168.0.1' AND port =
> 80 AND protocol = null;
> {noformat}
> It would then also make sense to support:
> {noformat}
> INSERT INTO connections (userid, ip, port, protocol, time) VALUES (2,
> '192.168.0.1', 80, null, 123456789);
> {noformat}
> as an equivalent to the insert query above.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira