Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8AA7C72C5 for ; Fri, 22 Jul 2011 22:56:33 +0000 (UTC) Received: (qmail 14178 invoked by uid 500); 22 Jul 2011 22:56:31 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 14103 invoked by uid 500); 22 Jul 2011 22:56:30 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 14095 invoked by uid 99); 22 Jul 2011 22:56:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jul 2011 22:56:30 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jbellis@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jul 2011 22:56:24 +0000 Received: by wwe5 with SMTP id 5so2189894wwe.25 for ; Fri, 22 Jul 2011 15:56:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=gC37pJeGB8rm5klLYptUNYAWmuPM3vy8uhvo5JQXmfw=; b=NFe0RhMns84pbGeh0XGJOopnWI3QsOSWD99sVTqkDABW4gJYq2orp4cVueF6WrIy10 5GtQB1mPIppFVXjGe7ixFH0VAAT1evBi1NGr2NdudcYjuC+OCp7nc5zf1TDzV2g1y1hq 8VeaJjOMgmvY4sMNthXWpTHSjJ4ERKkj+GfZY= Received: by 10.216.30.9 with SMTP id j9mr1595470wea.82.1311375363125; Fri, 22 Jul 2011 15:56:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.52.132 with HTTP; Fri, 22 Jul 2011 15:55:43 -0700 (PDT) In-Reply-To: References: From: Jonathan Ellis Date: Fri, 22 Jul 2011 17:55:43 -0500 Message-ID: Subject: Re: CQL COUNT Not Accurate? To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Yes, this is broken. We'll fix this for https://issues.apache.org/jira/browse/CASSANDRA-2474 On Fri, Jul 22, 2011 at 4:18 PM, Hefeng Yuan wrote: > Hi, > > I just noticed that the count(*) in CQL seems to be having wrong answer, when I have only one row, the count(*) returns two. > > Below are the commands I tried: > > cqlsh> SELECT COUNT(*) FROM UserProfile USING CONSISTENCY QUORUM WHERE KEY IN ('00D760DB1730482D81BC6845F875A97D'); > (2,) > cqlsh> select * from UserProfile where key = '00D760DB1730482D81BC6845F875A97D'; > u'00D760DB1730482D81BC6845F875A97D' | u'ScreenName','3D5C78CAE2E143FBBD1F539A8496D472' > > Is this a known bug? Or I did something wrong? > > Thanks, > Hefeng -- Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com