[
https://issues.apache.org/jira/browse/CASSANDRA-8781?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14316173#comment-14316173
]
Benjamin Lerer commented on CASSANDRA-8781:
-------------------------------------------
In order to support the specified query we need to support multiple
restrictions on the same column. So queries like:
{code}
SELECT * FROM cf WHERE id IN (1, 2, 3) AND id = 2;
SELECT * FROM cf WHERE id IN (1, 2, 3) AND id > 2 AND id < 15;
SELECT * FROM cf WHERE id = 0 AND (clustering_0) = (12) AND (clustering_0,
clustering_1) > (0, 5);
{code}
should also be supported.
I agree that it will be nice for convenience but on the other hand it is a
major change in the CQL layer that will add some significant complexity for
little benefits. Therefore, I would be more in favor of closing that ticket as
'later'.
Regarding the initial problem, I think that the problem should probably be
solved within the DBAL framework. A query like: {{SELECT * FROM cf WHERE id=1
AND id =1;}} look quite suspicious.
> SELECT * FROM cf WHERE (id=1) AND (id=1); error
> -----------------------------------------------
>
> Key: CASSANDRA-8781
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8781
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Sergey Nagaytsev
> Assignee: Benjamin Lerer
> Priority: Minor
>
> Error: CQLSTATE[HY000] [2] id cannot be restricted by more than one relation
> if it includes an Equal
> Actual query is with UUID type, 1's are just for short. The column 'id' is
> the only primary key in column family.
> The expression is perfectly logically valid and resolves to one or none
> record.
> It was generated by framework's DBAL as the result of narrowing down the
> query. Fixing it on application side will take deep heavy rewrite of all DB
> libs in all languages.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)