[
https://issues.apache.org/jira/browse/CASSANDRA-8613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14298394#comment-14298394
]
Benjamin Lerer commented on CASSANDRA-8613:
-------------------------------------------
According to Jared document and to the code it looks like we were also
supporting queries like:
{code}
SELECT * FROM mytable WHERE (clustering_0, clustering_1, clustering_2) = (?, ?,
?) AND (clustering_3, clustering_4) > (?, ?)
{code}
so my guess is that queries like:
{code}
SELECT * FROM mytable WHERE (clustering_0, clustering_1, clustering_2) = (?, ?,
?) AND clustering_3 > ?;
SELECT * FROM mytable WHERE (clustering_0, clustering_1, clustering_2) = (?, ?,
?) AND clustering_3 IN (?, ?);
{code}
were also valid.
This means that after CASSANDRA-6875 in 2.0 and 2.1 we should add support
queries for the following queries:
{code}
SELECT * FROM mytable WHERE clustering_0 = ? AND (clustering_1, clustering_2)
IN ((?, ?), (?, ?));
SELECT * FROM mytable WHERE clustering_0 = ? AND clustering_1 = ? AND
(clustering_2, clustering_3) IN ((?, ?), (?, ?));
{code}
In 3.0 we will need to add support for the IN queries like:
{code}
SELECT * FROM mytable WHERE (clustering_0, clustering_1, clustering_2) IN ((?,
?, ?), (?, ?, ?)) AND clustering_3 > ?;
SELECT * FROM mytable WHERE (clustering_0, clustering_1, clustering_2) IN ((?,
?, ?), (?, ?, ?)) AND clustering_3 IN (?, ?);
SELECT * FROM mytable WHERE clustering_0 = ? AND clustering_1 = ? AND
(clustering_2, clustering_3) IN ((?, ?), (?, ?)) AND (clustering_4,
clustering_5) > (?, ?);
{code}
In the end it can be summarize by: we need to support any type of mix between
single and multi column relations as long as it respect the constraints on
posisiton of the IN and slice operator.
> Regression in mixed single and multi-column relation support
> ------------------------------------------------------------
>
> Key: CASSANDRA-8613
> URL: https://issues.apache.org/jira/browse/CASSANDRA-8613
> Project: Cassandra
> Issue Type: Bug
> Components: Core
> Reporter: Tyler Hobbs
> Assignee: Benjamin Lerer
> Fix For: 2.1.3, 2.0.13
>
>
> In 2.0.6 through 2.0.8, a query like the following was supported:
> {noformat}
> SELECT * FROM mytable WHERE clustering_0 = ? AND (clustering_1, clustering_2)
> > (?, ?)
> {noformat}
> However, after CASSANDRA-6875, you'll get the following error:
> {noformat}
> Clustering columns may not be skipped in multi-column relations. They should
> appear in the PRIMARY KEY order. Got (c, d) > (0, 0)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)