Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28A41D348 for ; Tue, 30 Oct 2012 07:45:47 +0000 (UTC) Received: (qmail 98684 invoked by uid 500); 30 Oct 2012 07:45:44 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 98658 invoked by uid 500); 30 Oct 2012 07:45:44 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 98643 invoked by uid 99); 30 Oct 2012 07:45:44 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 07:45:44 +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 (nike.apache.org: domain of timm.turn@gmail.com designates 209.85.219.44 as permitted sender) Received: from [209.85.219.44] (HELO mail-oa0-f44.google.com) (209.85.219.44) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Oct 2012 07:45:37 +0000 Received: by mail-oa0-f44.google.com with SMTP id n5so6186078oag.31 for ; Tue, 30 Oct 2012 00:45:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ETSKUfXZWfMcIGpQKkAUUAQV9jJme5SANMCcwWcmnnQ=; b=Cl0E7DFsOpGgLRTsFg106eq61I/Y1iMKam8Ur9DeEVscCVCKZxoghcDOQ4UVQ7f5KC Y397q4NAfLey+keMcOh4hDznmKY9cE8RTIYbNQa6jZkEfpKUIul4QU/YrGh3EA9apP3i xUdS+SiHWdGFtG0PpaFmP5zPovS2DwxGtrL9tPpvdDqUox56NTittHhUHmtYXYgMlf56 i0qKoZUuMo1OpRXCmbgU9vqof4pm/vsvcokewHTVtL94Svv8VlxCqRBrIl8qRsUAgfXU 5HrrIyHmGvgDz8dJq7E2Pq93fYgUeHZ2iTFjHxVEjI3niY2FqmVMQbf1QBFp09alm8S3 0lLw== MIME-Version: 1.0 Received: by 10.182.4.174 with SMTP id l14mr26938879obl.88.1351583116632; Tue, 30 Oct 2012 00:45:16 -0700 (PDT) Received: by 10.60.171.40 with HTTP; Tue, 30 Oct 2012 00:45:16 -0700 (PDT) In-Reply-To: <9628F5E8-54D6-444E-A345-CCF906704B4F@thelastpickle.com> References: <9628F5E8-54D6-444E-A345-CCF906704B4F@thelastpickle.com> Date: Tue, 30 Oct 2012 08:45:16 +0100 Message-ID: Subject: Re: CQL3: Unknown property 'comparator'? From: Timmy Turner To: user@cassandra.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org > Is your use case covered in the article above ? My use case relied on "mangling" the column names for various purposes, and CQL3 with its transposed columns does of course still allow for that, but it means rewriting the part of the application that dealt with CQL so it can handle the new syntax/data model. That's not a problem, but I still needed a definitive statement that "schema-free tables" (not column families obviously) are now impossible within CQL, that I can document in the project as the reason for the changes. Thanks! 2012/10/30 aaron morton : > More background http://www.datastax.com/dev/blog/thrift-to-cql3 > > So does this mean that in CQL 3 an explicit schema is absolutely > mandatory? > > Not really, it sort of depends on your view. > > Lets say this is a "schema free" CF definition in CLI > > create column family clicks > with key_validation_class = UTF8Type > and comparator = DateType > and default_validation_class = UTF8Type > > It could be used for wide rows with lots of columns, where the name is a > date. > > As the article at the top says, this CQL 3 DDL is equivalent: > > CREATE TABLE clicks ( > key text, > column1 timestamp, > value text, > PRIMARY KEY (key, column) > ) WITH COMPACT STORAGE > > This creates a single row inside C*, column name is a date. The difference > is CQL 3 pivots this one "storage engine" row into multiple CQL 3 rows. (See > article) > > So far so good. Let's add some schema: > > CREATE TABLE clicks ( > user_id text, > click_time timestamp, > click_url text, > PRIMARY KEY (user_id, click_time) > ) WITH COMPACT STORAGE > > That's functionally the same but has some more schema in it. It tells CQL 3 > that the label to use for the name of a column is "click_time". Previously > the label was "column1". > > > It's now impossible (within CQL) to add new > (non-primary-key) columns only for individual rows implicitly with > DML-queries (insert/update)?. > > Is your use case covered in the article above ? > > Cheers > > ----------------- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 30/10/2012, at 2:31 AM, Timmy Turner wrote: > > Thank you! That article helps clear up a lot of my confusion about the > changes between CQL 2 and 3, since I was wondering how to > access/manipulate CompositeType/DynamicCompositeType columns through > CQL. > > So does this mean that in CQL 3 an explicit schema is absolutely > mandatory? It's now impossible (within CQL) to add new > (non-primary-key) columns only for individual rows implicitly with > DML-queries (insert/update)?. > > > > > 2012/10/29 Sylvain Lebresne : > > CQL3 does absolutely allow dynamic column families, but does it > differently from CQL2. See > http://www.datastax.com/dev/blog/cql3-for-cassandra-experts. > > -- > Sylvain > > On Mon, Oct 29, 2012 at 12:34 PM, Timmy Turner wrote: > > Does CQL3 not allow dynamic columns (column names) any more? > >