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 846BB18136 for ; Mon, 4 Apr 2016 06:54:26 +0000 (UTC) Received: (qmail 15667 invoked by uid 500); 4 Apr 2016 06:54:26 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 15617 invoked by uid 500); 4 Apr 2016 06:54:26 -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 15543 invoked by uid 99); 4 Apr 2016 06:54:26 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Apr 2016 06:54:26 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id C9F342C1F5A for ; Mon, 4 Apr 2016 06:54:25 +0000 (UTC) Date: Mon, 4 Apr 2016 06:54:25 +0000 (UTC) From: "Sylvain Lebresne (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CASSANDRA-7017) allow per-partition LIMIT clause in cql 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-7017?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sylvain Lebresne updated CASSANDRA-7017: ---------------------------------------- Assignee: Alex Petrov > allow per-partition LIMIT clause in cql > --------------------------------------- > > Key: CASSANDRA-7017 > URL: https://issues.apache.org/jira/browse/CASSANDRA-7017 > Project: Cassandra > Issue Type: Improvement > Reporter: Jonathan Halliday > Assignee: Alex Petrov > Labels: cql > Fix For: 3.x > > Attachments: 0001-CASSANDRA-7017.patch > > > somewhat related to static columns (#6561) and slicing (#4851), it is desirable to apply a LIMIT on a per-partition rather than per-query basis, such as to retrieve the top (most recent, etc) N clustered values for each partition key, e.g. > -- for each league, keep a ranked list of users > create table scores (league text, score int, player text, primary key(league, score, player) ); > -- get the top 3 teams in each league: > select * from scores staticlimit 3; > this currently requires issuing one query per partition key, which is tedious if all the key partition key values are known and impossible if they aren't. -- This message was sent by Atlassian JIRA (v6.3.4#6332)