cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Evans <eev...@acunu.com>
Subject Re: [1/4] git commit: note that using KEY instead of the defined key_alias has been removed
Date Tue, 10 Jan 2012 20:58:00 GMT
On Tue, Jan 10, 2012 at 2:45 PM, Jonathan Ellis <jbellis@gmail.com> wrote:
> Pedantic answer: yes, hence the NEWS entry
>
> More accurate answer: we've fixed a bug that allowed nonsense queries
>
> Long answer: we started off requiring the C* row key, aka PRIMARY KEY
> in CQL DDL, to be named "key."  We fixed that in 0.8.1, and required
> that SELECT statements use the actual PK name in most situations.
> However, we missed the range scan case (WHERE key > X), which
> continued to allow "key" even when that was not the PK name.  The
> breaking change then for 1.1 was to bring that in line with other
> SELECT forms by requiring the actual PK name be used.

How do users that created schemas before named keys fit in?  Or are
you saying that we had already broken them?

> On Tue, Jan 10, 2012 at 2:11 PM, Eric Evans <eevans@acunu.com> wrote:
>> This is a breaking change, isn't it?  Are we breaking the language and
>> updating the CQL major *again*?
>>
>>
>> ---------- Forwarded message ----------
>> From:  <jbellis@apache.org>
>> Date: Tue, Jan 10, 2012 at 2:01 PM
>> Subject: [1/4] git commit: note that using KEY instead of the defined
>> key_alias has been removed
>> To: commits@cassandra.apache.org
>>
>>
>> Updated Branches:
>>  refs/heads/cassandra-1.0 044eb1ede -> e2231a197
>>  refs/heads/trunk a3f2e9c3b -> d48a6c14f
>>
>>
>> note that using KEY instead of the defined key_alias has been removed
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d48a6c14
>> Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d48a6c14
>> Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d48a6c14
>>
>> Branch: refs/heads/trunk
>> Commit: d48a6c14f370dfe97eb4e45c567ea9d1923914c6
>> Parents: d371edf
>> Author: Jonathan Ellis <jbellis@apache.org>
>> Authored: Tue Jan 10 12:56:23 2012 -0600
>> Committer: Jonathan Ellis <jbellis@apache.org>
>> Committed: Tue Jan 10 12:56:23 2012 -0600
>>
>> ----------------------------------------------------------------------
>>  NEWS.txt                                           |    5
+++++
>>  src/java/org/apache/cassandra/cql/WhereClause.java |    4 +---
>>  2 files changed, 6 insertions(+), 3 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>> http://git-wip-us.apache.org/repos/asf/cassandra/blob/d48a6c14/NEWS.txt
>> ----------------------------------------------------------------------
>> diff --git a/NEWS.txt b/NEWS.txt
>> index 24039e6..868ff73 100644
>> --- a/NEWS.txt
>> +++ b/NEWS.txt
>> @@ -39,6 +39,11 @@ Upgrading
>>     - Hadoop input and output details are now separated.  If you were
>>       previously using methods such as getRpcPort you now need to use
>>       getInputRpcPort or getOutputRpcPort depending on the circumstance.
>> +    - CQL changes:
>> +      + Prior to 1.1, you could use KEY as the primary key name in some
>> +        select statements, even if the PK was actually given a different
>> +        name.  In 1.1+ you must use the defined PK name.
>> +
>>
>>  Features
>>  --------
>>
>> http://git-wip-us.apache.org/repos/asf/cassandra/blob/d48a6c14/src/java/org/apache/cassandra/cql/WhereClause.java
>> ----------------------------------------------------------------------
>> diff --git a/src/java/org/apache/cassandra/cql/WhereClause.java
>> b/src/java/org/apache/cassandra/cql/WhereClause.java
>> index 13e27e9..0007c98 100644
>> --- a/src/java/org/apache/cassandra/cql/WhereClause.java
>> +++ b/src/java/org/apache/cassandra/cql/WhereClause.java
>> @@ -160,7 +160,7 @@ public class WhereClause
>>         for (Relation relation : clauseRelations)
>>         {
>>             String name = relation.getEntity().getText().toUpperCase();
>> -            if (name.equals(realKeyAlias) || name.equals("KEY"))
>> +            if (name.equals(realKeyAlias))
>>             {
>>                 if (keyAlias == null) // setting found key as an alias
>>                     keyAlias = name;
>> @@ -199,6 +199,4 @@ public class WhereClause
>>                              multiKey,
>>                              keyAlias);
>>     }
>> -
>> -
>>  }
>>
>>
>>
>> --
>> Eric Evans
>> Acunu | http://www.acunu.com | @acunu
>
>
>
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support
> http://www.datastax.com



-- 
Eric Evans
Acunu | http://www.acunu.com | @acunu

Mime
View raw message