Return-Path: X-Original-To: apmail-cassandra-dev-archive@www.apache.org Delivered-To: apmail-cassandra-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1FF25716E for ; Thu, 29 Dec 2011 21:45:35 +0000 (UTC) Received: (qmail 38204 invoked by uid 500); 29 Dec 2011 21:45:34 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 38109 invoked by uid 500); 29 Dec 2011 21:45:34 -0000 Mailing-List: contact dev-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 dev@cassandra.apache.org Received: (qmail 38101 invoked by uid 99); 29 Dec 2011 21:45:34 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 21:45:34 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jbellis@gmail.com designates 74.125.83.44 as permitted sender) Received: from [74.125.83.44] (HELO mail-ee0-f44.google.com) (74.125.83.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Dec 2011 21:45:29 +0000 Received: by eekc14 with SMTP id c14so12005879eek.31 for ; Thu, 29 Dec 2011 13:45:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:content-transfer-encoding; bh=7UhEviia3kuFTKcNYCd1CT3gdxdNJ8lhn/jLZslk+0Q=; b=Zw05TtLAU0fk0Ap1fv7LX08AR7YTXp2O7AcbjqwS9jZIpg5RC/mwqmT9GNNJfl/Hww e8x+vJD7HmeHkDGI9EqtYVYzO/RFGfzM9XmO1V8SEMZ66wxVZr+SEneGn1+AaUYnHgxS pLuHS1EbRg7SfsYX8CjPoWdyzuVse9JRPPtVc= Received: by 10.204.38.16 with SMTP id z16mr9293357bkd.66.1325195108313; Thu, 29 Dec 2011 13:45:08 -0800 (PST) MIME-Version: 1.0 Received: by 10.204.55.74 with HTTP; Thu, 29 Dec 2011 13:44:47 -0800 (PST) In-Reply-To: References: From: Jonathan Ellis Date: Thu, 29 Dec 2011 15:44:47 -0600 Message-ID: Subject: Re: CQL support for compound columns To: dev@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable That's to allow defining column names that are not text/utf8. So you could have column name "92d21d0a-d6cb-437c-9d3f-b67aa733a19f" be an actual 128-bit uuid binary value internally, not its string representation. Put another way, this would affect the CqlMetadata name_types map. However, we already have the "column names are always strings" limitations with existing CQL DDL so it probably makes more sense to consider it separately from transposition. On Thu, Dec 29, 2011 at 3:22 PM, Eric Evans wrote: > On Wed, Dec 28, 2011 at 1:05 PM, Jonathan Ellis wrote= : >> Gamma proposal update: >> >> The more I think about it the less happy I am with omitting support >> for sparse columns. =A0Remember that dense composites may only be >> inserted and deleted, not updated, since they are just a tuple of >> values with "column names" determined by schema and/or convention. >> >> I think we can support sparse columns well in a way that improves the >> conceptual integrity for the dense composites as well: >> >> {code} >> -- "column" and "value" are sparse; a transposed row will be stored as >> -- two columns of (user_id, posted_at, 'column': string) and (user_id, >> posted_at, 'value': blob) >> CREATE TABLE timeline ( >> =A0 user_id int, >> =A0 posted_at uuid, >> =A0 column string, >> =A0 value blob, >> =A0 PRIMARY KEY(user_id, posted_at) >> ) TRANSPOSED; >> >> -- entire transposed row is stored as a single dense composite column >> -- (series, ts1, cat, subcat, 1337, 92d21d0a-...: []). =A0Note that the >> -- composite column's value is unused in this case. >> CREATE TABLE events ( >> =A0 series text, >> =A0 ts1 int, >> =A0 cat text, >> =A0 subcat text, >> =A0 "1337" uuid, >> =A0 "92d21d0a-d6cb-437c-9d3f-b67aa733a19f" bigint, >> =A0 PRIMARY KEY(series, ts1, cat, subcat, "1337", >> "92d21d0a-d6cb-437c-9d3f-b67aa733a19f") >> ) TRANSPOSED WITH COLUMN NAMES ("1337" int, >> "92d21d0a-d6cb-437c-9d3f-b67aa733a19f" uuid); >> {code} > > Could you explain what this "TRANSPOSED WITH COLUMN NAMES" syntax does > (or link to a previous description if I missed it)? > >> Thus, columns included in the (transposed) primary key will be >> "dense," and not updateable, which conforms to our existing practice >> that keys are not updateable. =A0Remaining columns will be updateable >> since they will each map to a separate physical column. > > > > -- > Eric Evans > Acunu |=A0http://www.acunu.com=A0| @acunu --=20 Jonathan Ellis Project Chair, Apache Cassandra co-founder of DataStax, the source for professional Cassandra support http://www.datastax.com