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 006A3E906 for ; Sat, 2 Mar 2013 15:37:37 +0000 (UTC) Received: (qmail 75251 invoked by uid 500); 2 Mar 2013 15:37:36 -0000 Delivered-To: apmail-cassandra-dev-archive@cassandra.apache.org Received: (qmail 75176 invoked by uid 500); 2 Mar 2013 15:37:35 -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 75166 invoked by uid 99); 2 Mar 2013 15:37:35 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Mar 2013 15:37:35 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of edlinuxguru@gmail.com designates 74.125.82.172 as permitted sender) Received: from [74.125.82.172] (HELO mail-we0-f172.google.com) (74.125.82.172) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 02 Mar 2013 15:37:28 +0000 Received: by mail-we0-f172.google.com with SMTP id x10so3392592wey.3 for ; Sat, 02 Mar 2013 07:37:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=H/nxPlLK4FWCnrTS9Eb+8mb61PFNziCizEoPpqhwz94=; b=GzWjYA+yPlDjC4UBskHnpF3VVVgXjVmPJB8UUPhkqH0AW9ZU0dJSt5PWWoYoCvy62n SzaKN504KAnvyTM1te/GDKz8u9JO4yC748GjkCTzcextux7Jhd5chDghs/Y1/g1Stc+O hpbBShoQhgNQYPlr0m7tmJkPDZ0zNj6exH79ynxODfDM/82odxJ1C96jeso9T/RHo9wU Q+0EnMTyVUQJqvRy56+vn5n23abxczRGyEJDyep2q8jqxCYoo6ZKN2Lqj8lhxC4+1eVP o9VN+BAbGyi3aOBKx0LWM6w/due0EQ8c1ApHdEicCt/MRaG3Mm6QkbHg11cNxOzGF4Fd STEg== MIME-Version: 1.0 X-Received: by 10.180.83.227 with SMTP id t3mr3457685wiy.2.1362238628245; Sat, 02 Mar 2013 07:37:08 -0800 (PST) Received: by 10.194.61.137 with HTTP; Sat, 2 Mar 2013 07:37:08 -0800 (PST) In-Reply-To: References: Date: Sat, 2 Mar 2013 10:37:08 -0500 Message-ID: Subject: Re: bug report - CQL3 grammar should ignore VARCHAR column length in CREATE statements From: Edward Capriolo To: dev@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d0421a64f89389204d6f2e510 X-Virus-Checked: Checked by ClamAV on apache.org --f46d0421a64f89389204d6f2e510 Content-Type: text/plain; charset=ISO-8859-1 It might be reasonable to enforce length on byte and string since this is an upper limit, but just adding it to the grammer for compatability is just more grammer. Personally I like nosql because of the nogrammer part, CQL create table is not toocumbersome butI dont want to jump through hoops specifying stuff that is not actually important in the final outcome. On Sat, Mar 2, 2013 at 6:11 AM, Andrew Prendergast wrote: > *DESCRIPTION* > > When creating a table in all ANSI-SQL compliant RDBMS' the VARCHAR datatype > takes a numeric parameter, however this parameter is generating errors in > CQL3. > > *STEPS TO REPRODUCE* > > CREATE TABLE test (id BIGINT PRIMARY KEY, col1 VARCHAR(256)); // emits Bad > Request: line 1:54 mismatched input '(' expecting ')' > > CREATE TABLE test (id BIGINT PRIMARY KEY, col1 VARCHAR); // this works > > *SUGGESTED RESOLUTION* > > The current fail-fast approach does not create the column so that the user > is 100% clear that the length parameter means nothing to NOSQL. > > I would like to propose that the column length be allowed in the grammar > (but ignored by cassandra), allowing better ANSI-SQL client compatibility. > --f46d0421a64f89389204d6f2e510--