Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 68660 invoked from network); 24 Mar 2011 14:12:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Mar 2011 14:12:33 -0000 Received: (qmail 31637 invoked by uid 500); 24 Mar 2011 14:12:31 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 31611 invoked by uid 500); 24 Mar 2011 14:12:31 -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 31603 invoked by uid 99); 24 Mar 2011 14:12:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 14:12:31 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,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 209.85.220.172 as permitted sender) Received: from [209.85.220.172] (HELO mail-vx0-f172.google.com) (209.85.220.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Mar 2011 14:12:26 +0000 Received: by vxg33 with SMTP id 33so3921vxg.31 for ; Thu, 24 Mar 2011 07:12:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:from:date :message-id:subject:to:content-type:content-transfer-encoding; bh=uaqgAT7wjm+j3eRBDk+DcQ6oVsV9582fXNkmAX0uzxI=; b=FNbHiizHzxiMWBKkWxAlgkd9FXMlFLIL3+cdgosVv5/spJ7Bq0HtY1LOL997rEFkfC ATN7X58bzVOolL4locCr/KWXMeAqeIWygKN3oQHum11nbOlNHwRJUVGuxF5gFa4Nu92w elbpvwWBMcyIv03wl77X015DhRNfC7YQPNWNo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; b=Zen5aIE8ITVKsvySwIym7ygXpMCDLx5RHBG8ntmSt4NinptcVtWR+GSoGE0h8biv2k 0uIo/r2eIKY/1+tGiyyZYPZew6rvaciQcgvAwypCmhRRqur0On+eI22b9cBTaK2pmAaU tifMJTPWj2Cul8p3Kk3vcu6LTBTxG2cykuY6s= Received: by 10.52.100.2 with SMTP id eu2mr503914vdb.20.1300975925122; Thu, 24 Mar 2011 07:12:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.169.228 with HTTP; Thu, 24 Mar 2011 07:11:45 -0700 (PDT) In-Reply-To: <6F8DF32E96493B44B00A17248867481E02C723@SZXEML505-MBS.china.huawei.com> References: <6F8DF32E96493B44B00A17248867481E02C6B7@SZXEML505-MBS.china.huawei.com> <6F8DF32E96493B44B00A17248867481E02C723@SZXEML505-MBS.china.huawei.com> From: Jonathan Ellis Date: Thu, 24 Mar 2011 09:11:45 -0500 Message-ID: Subject: Re: result of get_indexed_slices() seems wrong To: user@cassandra.apache.org Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org it's unusual but valid to have an expression on a column w/ no metadata. 2011/3/24 Wangpei (Peter) : > Thanks aaron. > > Maybe we need to do more check at ThriftValidation.validateIndexClauses()= , > add this: > > Map colDefs =3D > DatabaseDescriptor.getTableDefinition(keyspace).cfMetaData().get(columnFa= mily).getColumn_metadata(); > > for (IndexExpression expression : index_clause.expressions) > > { > > if (!colDefs.containsKey(expression.column_name)) > > throw new InvalidRequestException("No column definition f= or > " + expression.column_name); > > } > > > > > > =B7=A2=BC=FE=C8=CB: aaron morton [mailto:aaron@thelastpickle.com] > =B7=A2=CB=CD=CA=B1=BC=E4: 2011=C4=EA3=D4=C224=C8=D5 12:24 > =CA=D5=BC=FE=C8=CB: user@cassandra.apache.org > =D6=F7=CC=E2: Re: result of get_indexed_slices() seems wrong > > > > Looks like this https://issues.apache.org/jira/browse/CASSANDRA-2347 > > > > From this > discussion http://www.mail-archive.com/user@cassandra.apache.org/msg11291= .html > > > > > > Aaron > > > > On 24 Mar 2011, at 17:17, Wangpei (Peter) wrote: > > Hi, > > > > This problem occurs when the clause has multi expression and a expression > with operator other than EQ. > > Is anyone meet the same problem? > > > > I trace the code, and seen this at ColumnFamilyStore.satisfies() method: > > int v =3D data.getComparator().compare(column.value(), > expression.value); > > It seems when I need the type of column value here, it use the type of my > column names which is UTF8Type, so give the wrong result. > > To fix it, the expression needs a optional "comparator_type" attribute, t= hen > satisfies() can get the correct type to compare. > > pls point out if I am wrong. > > > > > > --=20 Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com