[jira] [Updated] (CASSANDRA-3036) Vague primary key references in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-3036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavel Yaskevich updated CASSANDRA-3036: --- Attachment: CASSANDRA-3036.patch 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 Attachments: CASSANDRA-3036.patch 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
[jira] [Updated] (CASSANDRA-3036) Vague primary key references in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-3036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Pavel Yaskevich updated CASSANDRA-3036: --- Attachment: CASSANDRA-3036-v2.patch bq. let's name the ColumnDef variable in validateCfDef something other than column (which usually means an IColumn or similar) Renamed to columnDef bq. when we throw an invalid column name error, we should use the CF's comparator rather than AsciiType (which will error out on many binary column names) I use cf.key_alias in there which we force to be AsciiType so it should be fine bq. CCFS calls getByteBuffer which catches MarshallException and turns it into IRE. Suggest doing the validation ones from CCFS.validate, that way we don't have to do it again in CCFS.getColumns. (Can just call AbstractType.fromString directly) changed CCFS.getColumns to use comparator.fromString and changed validate method as you mentioned. 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: core, cql Fix For: 0.8.5 Attachments: CASSANDRA-3036-v2.patch, CASSANDRA-3036.patch 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
[jira] [Updated] (CASSANDRA-3036) Vague primary key references in CQL
[ https://issues.apache.org/jira/browse/CASSANDRA-3036?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jonathan Ellis updated CASSANDRA-3036: -- Affects Version/s: 0.8.1 Fix Version/s: 0.8.5 Assignee: Pavel Yaskevich We should validate that column_metadata does not get created with the key_alias, or column insertions where the column name is the key_alias. (For both CQL and old paths.) 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