cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremiah Jordan (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-11487) Make behavior of empty strings in primary keys consistent.
Date Mon, 04 Apr 2016 14:55:25 GMT

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

Jeremiah Jordan commented on CASSANDRA-11487:
---------------------------------------------

Yeah, we may just have to live with the inconsistency.  Just had a user be confused by this,
so at least wanted to bring it up/get it documented in a JIRA.  I agree empty keys is a weird
case, and my preference would have been that both fail, its just makes it strange when one
works and one doesn't.

> 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)

Mime
View raw message