cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gavin Casey (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-6706) Duplicate rows returned when in clause has repeated values
Date Fri, 14 Feb 2014 13:39:20 GMT

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

Gavin Casey commented on CASSANDRA-6706:
----------------------------------------

If I were performing a calculation summing the results then the answer would be wrong. 
I suppose it is arguable that I should know better than to put duplicates in an in clause
but this bit me when I was generating a query by aggregating selection parameters from separate
sources.
My background is much more extensive in relational databases and in Postgres (to take my preferred
example) I would only get back one row for this query which in terms of correctness is absolutely
what I would expect.

> Duplicate rows returned when in clause has repeated values
> ----------------------------------------------------------
>
>                 Key: CASSANDRA-6706
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6706
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>         Environment: Found on 
> [cqlsh 4.1.0 | Cassandra 2.0.3-SNAPSHOT | CQL spec 3.0.0 | Thrift protocol 19.38.0]
>            Reporter: Gavin Casey
>
> If a value is repeated within an IN clause then repeated rows are returned for  the repeats:
> cqlsh> create table t1(c1 text primary key);
> cqlsh> insert into t1(c1) values ('A');
> cqlsh> select * from t1;
>  c1
> ----
>   A
> cqlsh> select * from t1 where c1 = 'A';
>  c1
> ----
>   A
> cqlsh> select * from t1 where c1 in( 'A');
>  c1
> ----
>   A
> cqlsh:dslog> select * from t1 where c1 in( 'A','A');
>  c1
> ----
>   A
>   A



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message