From commits-return-208788-archive-asf-public=cust-asf.ponee.io@cassandra.apache.org Wed Apr 11 01:34:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 39ACE18067B for ; Wed, 11 Apr 2018 01:34:04 +0200 (CEST) Received: (qmail 68458 invoked by uid 500); 10 Apr 2018 23:34:03 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 68444 invoked by uid 99); 10 Apr 2018 23:34:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 10 Apr 2018 23:34:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BA8D318028B for ; Tue, 10 Apr 2018 23:34:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -110.311 X-Spam-Level: X-Spam-Status: No, score=-110.311 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id wVv-m-Lq6rOo for ; Tue, 10 Apr 2018 23:34:02 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 781705F16A for ; Tue, 10 Apr 2018 23:34:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7BAAAE0117 for ; Tue, 10 Apr 2018 23:34:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 329ED2120A for ; Tue, 10 Apr 2018 23:34:00 +0000 (UTC) Date: Tue, 10 Apr 2018 23:34:00 +0000 (UTC) From: "Chris mildebrandt (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CASSANDRA-14376) Limiting a clustering column with a range not allowed when using "group by" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Chris mildebrandt created CASSANDRA-14376: --------------------------------------------- Summary: Limiting a clustering column with a range not allowed= when using "group by" Key: CASSANDRA-14376 URL: https://issues.apache.org/jira/browse/CASSANDRA-14376 Project: Cassandra Issue Type: Bug Components: CQL Environment: Cassandra 3.11.1 Reporter: Chris mildebrandt I=E2=80=99m trying to use a range to limit a clustering column while at the= same time using `group by` and running into issues. Here=E2=80=99s a sampl= e table: {{create table if not exists samples (name text, partition int, sample int,= city text, state text, count counter, primary key ((name, partition), samp= le, city, state)) with clustering order by (sample desc);}} When I filter `sample` by a range, I get an error: {{select city, state, sum(count) from samples where name=3D'bob' and partit= ion=3D1 and sample>=3D1 and sample<=3D3 group by city, state;}} {{{color:#FF0000}InvalidRequest: Error from server: code=3D2200 [Invalid qu= ery] message=3D"Group by currently only support groups of columns following= their declared order in the PRIMARY KEY"{color}}} However, it allows the query when I change from a range to an equals: {{select city, state, sum(count) from samples where name=3D'bob' and partit= ion=3D1 and sample=3D1 group by city, state;}} {{city | state | system.sum(count)}} {{--------+-------+-------------------}} {{ Austin | TX | 2}} {{ Denver | CO | 1}} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org