incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Capriolo <edlinuxg...@gmail.com>
Subject Re: bug report - CQL3 grammar should ignore VARCHAR column length in CREATE statements
Date Sat, 02 Mar 2013 15:37:08 GMT
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 <ap@andrewprendergast.com
> 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.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message