Return-Path: X-Original-To: apmail-cassandra-commits-archive@www.apache.org Delivered-To: apmail-cassandra-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B23FDC65C for ; Fri, 14 Mar 2014 16:02:52 +0000 (UTC) Received: (qmail 62922 invoked by uid 500); 14 Mar 2014 16:02:48 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 62785 invoked by uid 500); 14 Mar 2014 16:02:44 -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 62746 invoked by uid 99); 14 Mar 2014 16:02:43 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2014 16:02:43 +0000 Date: Fri, 14 Mar 2014 16:02:43 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-6857) SELECT DISTINCT with a LIMIT is broken by paging MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CASSANDRA-6857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-6857: ---------------------------------------- Attachment: 6857-2.1.txt 6857-2.0.txt In theory, the problem is that PagedRangeCommand doesn't preserve the countCQ3Rows parameter of the original RangeSliceCommand. However, on 2.0, we can't add it as this is a breaking messaging protocol change. Fortunately, we can work around that easily enough, see the attached patch. I still attach a patch for 2.1 that "does the right thing" because that's less of a hack on the long run. Note that the QueryPagers change is a minor optimization that is not entirely related to the fix of this issue, but that's easy enough. > SELECT DISTINCT with a LIMIT is broken by paging > ------------------------------------------------ > > Key: CASSANDRA-6857 > URL: https://issues.apache.org/jira/browse/CASSANDRA-6857 > Project: Cassandra > Issue Type: Bug > Reporter: Sylvain Lebresne > Assignee: Sylvain Lebresne > Fix For: 2.0.7 > > Attachments: 6857-2.0.txt, 6857-2.1.txt > > > The paging for RangeSliceCommand only support the case where we count CQL3 rows . However, in the case of SELECT DISTINCT, we do actually want to use the "count partitions, not CQL3 row" path and that's currently broken when the paging commands are used (this was first reported on the [Java driver JIRA|thttps://datastax-oss.atlassian.net/browse/JAVA-288] and there is a reproduction script there). -- This message was sent by Atlassian JIRA (v6.2#6252)