[ 
https://issues.apache.org/jira/browse/CASSANDRA-11487?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15224245#comment-15224245
 ] 

Jeremiah Jordan edited comment on CASSANDRA-11487 at 4/4/16 2:37 PM:
---------------------------------------------------------------------

While what should probably have been happening from the beginning is the 2nd 
insert failing with the same "empty not allowed" exception (its not technically 
empty because it has the composite encoding).  Too late to start failing the 
second case now, but maybe we can let the first case succeed. The main issue is 
dealing with a primary key that is an empty byte buffer.


was (Author: jjordan):
While what should probably have been happening from the beginning is the 2nd 
insert failing with the same "empty not allowed" exception (its not technically 
empty because it has the composite encoding).  Too late to start failing the 
second case now, but maybe we can let the first can succeed. The main issue is 
dealing with a primary key that is an empty byte buffer.

> Make behavior of empty strings in primary keys consistent.
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-11487
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11487
>             Project: Cassandra
>          Issue Type: Improvement
>            Reporter: Jeremiah Jordan
>            Priority: Minor
>
> Empty strings are allowed in composite primary keys, but not single-column 
> primary keys.
> Example:
> {code}
> create table bla (
> pk text primary key,
> val text
> );
> insert into bla (pk, val) values ('', '');
> {code}
> throws: Key may not be empty.
> {code}
> create table bla2 (
> pk text,
> pk2 text,
> val text,
> primary key ((pk, pk2))
> );
> insert into bla2 (pk, pk2, val) values ('', '', '');
> {code}
> succeeds



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to