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 A7C2FE2CD for ; Tue, 5 Mar 2013 18:24:13 +0000 (UTC) Received: (qmail 87859 invoked by uid 500); 5 Mar 2013 18:24:13 -0000 Delivered-To: apmail-cassandra-commits-archive@cassandra.apache.org Received: (qmail 87836 invoked by uid 500); 5 Mar 2013 18:24:13 -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 87827 invoked by uid 99); 5 Mar 2013 18:24:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Mar 2013 18:24:13 +0000 Date: Tue, 5 Mar 2013 18:24:13 +0000 (UTC) From: "Ahmet AKYOL (JIRA)" To: commits@cassandra.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CASSANDRA-5313) provide a cardinality function for collection types ( CQL3 ) 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-5313?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13593710#comment-13593710 ] Ahmet AKYOL commented on CASSANDRA-5313: ---------------------------------------- {quote} but there is always the worry that people will expect it to be smarter than that when it isn't {quote} that's why I told my wish "maybe mixing counter columns and other data types in a table could be better ". I also said "from schema design point of view" because I didn't figure how to design my use case yet.Perhaps, it's time for you (guys) to write a "Cassandra in action" book since cql 3 is a bit [mystery even for experts|http://www.datastax.com/dev/blog/cql3-for-cassandra-experts]. I assure you, I'll be the first one to buy it in [MEAP|http://www.manning.com/about/meap.html] :) Anyway, maybe this feature still can be useful for lazy loading. what I mean is, we can only store keys of another table in a set for uniqueness and still query the count (cardinality) in cql without any trick. > provide a cardinality function for collection types ( CQL3 ) > ------------------------------------------------------------ > > Key: CASSANDRA-5313 > URL: https://issues.apache.org/jira/browse/CASSANDRA-5313 > Project: Cassandra > Issue Type: Improvement > Reporter: Ahmet AKYOL > Labels: cql3, ponies > > Currently , cql3 doesn't provide a cardinality function for collection types. It'll be great to have one: > {code} > select content, cardinality(like_set),cardinality(dislike_set) from comments where id=?; > {code} > or size as keyword > {code} > select content, size(like_set),size(dislike_set) from comments where id=?; > {code} > Something similar in SQL is [cardinality of nested tables|http://www.techonthenet.com/oracle/functions/cardinality.php] . -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira