[ https://issues.apache.org/jira/browse/CASSANDRA-5674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sylvain Lebresne resolved CASSANDRA-5674. ----------------------------------------- Resolution: Invalid > Inserting Zero Byte values via CQL for types other than Ascii / binary > ---------------------------------------------------------------------- > > Key: CASSANDRA-5674 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5674 > Project: Cassandra > Issue Type: Bug > Reporter: Tobias Schlottke > > Hi there, > we're currently upgrading from thrift to cql and are experiencing another > problem with "null" values (similar to #CASSSANDRA-5648). > I respect the fact that null means delete and that I have to insert a zero > byte value but what is the right zero byte value for types other than > ascii/blob? > Usecase: > {code} > CREATE TABLE foo ( > key1 ascii, > key2 timeuuid, > key3 ascii, > value ascii, > PRIMARY KEY (key1, key2, key3) > ) WITH COMPACT STORAGE; > {code} > I got a clustering key on three columns and want to insert an "empty" value > for the Timeuuid in the middle (key2). > For data already inserted via thrift I see "null" for all relevant columns > already in there, which would be my desired behaviour. > trying this: > {code} > insert into foo(key1,key2,key3) values('test', null, 'test'); > {code} > returns > {code} > Bad Request: Invalid null value for clustering key part key2 > {code} > Which is okay if null implicitly means "delete". > The question is: Am I able to insert a zero byte value for a type like > timeuuid that will be compatible with my old dataset where "null" values > where possible via thrift? > Best, > Tobias -- 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