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

Jonathan Ellis commented on CASSANDRA-3036:
-------------------------------------------

Well, there's two ways we can compare them anyway:

- compare the native bytes 
- compare the human-readable strings

I think I'd prefer #1, because 99.9% of the time these are going to give the 
same answer for names/aliases that do not conflict, and String creation is 
relatively expensive so I'd rather not do that.

> Vague primary key references in CQL
> -----------------------------------
>
>                 Key: CASSANDRA-3036
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-3036
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API
>    Affects Versions: 0.8.1
>            Reporter: Kelley Reynolds
>            Assignee: Pavel Yaskevich
>            Priority: Minor
>              Labels: cql
>             Fix For: 0.8.5
>
>
> create columnfamily wonk (id 'utf8' primary key, id int)
> update wonk set id=1 where id='test'
> create index wonk_id on wonk (id)
> This does what you would expect but then the results are unclear when using 
> 'id' in a where clause.
> "select * from wonk where id=1" returns nothing and "select * from wonk where 
> id='test'" works fine.
> Perhaps secondary indexes should not be allowed on columns that have the same 
> name as the key_alias? At least a warning or something should be thrown to 
> indicate you've just made a useless index.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to