cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-5648) Cassandra: Insert of null value not possible with CQL3?
Date Tue, 18 Jun 2013 13:41:20 GMT


Aleksey Yeschenko commented on CASSANDRA-5648:

bq. Specifically, it seems quite reasonable to me to support "I want to insert just the PK
columns without clobbering existing values if such exist."

And that's how it is for non-compact tables. But you just can't do the same for COMPACT (without
read-before-write, at least, and r-b-w would be a deal breaker).
> Cassandra: Insert of null value not possible with CQL3?
> -------------------------------------------------------
>                 Key: CASSANDRA-5648
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 1.2.0
>            Reporter: Tobias Schlottke
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.6
> Hi there,
> I'm trying to migrate a project from thrift to cql3/java driver and I'm experiencing
a strange problem.
> Schema:
> {code}
>   key ascii,
>   column1 ascii,
>   foo ascii,
>   PRIMARY KEY (key, column1)
> {code}
> The table just consists of a primary key and a value, sometimes all the information lies
in the key though, so the value is not needed.
> Through the thrift interface, it just works fine to leave out "foo".
> Executing this query:
> {code}
> INSERT INTO foo(key, column1) VALUES ('test', 'test2');
> {code}
> Fails with
> "Bad Request: Missing mandatory column foo"
> though.
> Explicitly inserting "null" as a value does not store the column / deletes the old one
with a "null" value inserted through thrift.
> Inserting an empty String works fine, but this seems a bit bloated.
> Is this intended to (not) work this way?
> 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:

View raw message