cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Petrov (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-11339) WHERE clause in SELECT DISTINCT can be ignored
Date Tue, 12 Apr 2016 15:43:25 GMT

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

Alex Petrov edited comment on CASSANDRA-11339 at 4/12/16 3:43 PM:
------------------------------------------------------------------

Suggested changes are now submitted, the branches are as follows

|| |2.2|trunk|
||code|[2.2|https://github.com/ifesdjeen/cassandra/tree/11339-2.2]|[trunk|https://github.com/ifesdjeen/cassandra/tree/11339-trunk]|
||utest|[2.2|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11339-2.2-testall/]|[trunk|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11339-trunk-testall/]|
||dtest|[2.2|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11339-2.2-dtest]|[trunk|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11339-trunk-dtest]|

{{utest}} failures are passing locally and seem unrelated. 
For the {{dtest}} failures, I've submitted the patch to dtest removing paging tests [here|https://github.com/riptano/cassandra-dtest/pull/925],
since {{SELECT DISTINCT a, s FROM test WHERE s >= 1 ALLOW FILTERING}} and {{SELECT DISTINCT
a, s FROM test WHERE s >= 1 LIMIT 2 ALLOW FILTERING}} are disallowed. Re-running dtests
right now.


was (Author: ifesdjeen):
Suggested changes are now submitted, the branches are as follows

|| |2.2|trunk|
||code|[2.2|https://github.com/ifesdjeen/cassandra/tree/11339-2.2]|[trunk|https://github.com/ifesdjeen/cassandra/tree/11339-trunk]|
||utest|[2.2|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11339-2.2-testall/]|[trunk|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11339-trunk-testall/]|
||dtest|[2.2|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11339-2.2-dtest]|[trunk|https://cassci.datastax.com/view/Dev/view/ifesdjeen/job/ifesdjeen-11339-trunk-dtest]|


> WHERE clause in SELECT DISTINCT can be ignored
> ----------------------------------------------
>
>                 Key: CASSANDRA-11339
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11339
>             Project: Cassandra
>          Issue Type: Bug
>          Components: CQL
>            Reporter: Philip Thompson
>            Assignee: Alex Petrov
>             Fix For: 2.2.x, 3.x
>
>         Attachments: 0001-Add-validation-for-distinct-queries-disallowing-quer.patch
>
>
> I've tested this out on 2.1-head. I'm not sure if it's the same behavior on newer versions.
> For a given table t, with {{PRIMARY KEY (id, v)}} the following two queries return the
same result:
> {{SELECT DISTINCT id FROM t WHERE v > X ALLOW FILTERING}}
> {{SELECT DISTINCT id FROM t}}
> The WHERE clause in the former is silently ignored, and all id are returned, regardless
of the value of v in any row. 
> It seems like this has been a known issue for a while:
> http://stackoverflow.com/questions/26548788/select-distinct-cql-ignores-where-clause
> However, if we don't support filtering on anything but the partition key, we should reject
the query, rather than silently dropping the where clause



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message