Details
-
Sub-task
-
Status: Resolved
-
Low
-
Resolution: Fixed
Description
Dense composite supports adding records where only a prefix of all the component specifying the key is defined. In other words, with:
CREATE TABLE connections ( userid int, ip text, port int, protocol text, time timestamp, PRIMARY KEY (userid, ip, port, protocol) ) WITH COMPACT STORAGE
you can insert
INSERT INTO connections (userid, ip, port, time) VALUES (2, '192.168.0.1', 80, 123456789);
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
SELECT * FROM connections WHERE userid = 2 AND ip = '192.168.0.1' AND port = 80 AND protocol = null;
It would then also make sense to support:
INSERT INTO connections (userid, ip, port, protocol, time) VALUES (2, '192.168.0.1', 80, null, 123456789);
as an equivalent to the insert query above.
Attachments
Attachments
Issue Links
- is duplicated by
-
CASSANDRA-5416 Support CQL map and list deletes within an update statement
- Resolved