incubator-cassandra-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Lebresne <>
Subject Re: bug report - CQL3 grammar should ignore VARCHAR column length in CREATE statements
Date Mon, 04 Mar 2013 08:08:52 GMT
> 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.

CQL3 is *not* ANSI-SQL compliant and will never be. It's not even SQL.

> I would like to propose that the column length be allowed in the grammar
> (but ignored by cassandra), allowing better ANSI-SQL client compatibility.

I agree with Ed and disagree with your proposal. Allowing a length
but not respecting it would only help people to shoot themselves in the
foot, as
they would be led to believe Cassandra does validate the length where it

If would be acceptable to add the length only if we do respect it. Which is
something we could do, though adding it "just" to make it close to ANSI-SQL
honestly doesn't interest me much (adding it because it's useful would be a
better argument however) because again, CQL is not SQL. In particular, you
don't model application with CQL the same way you do with SQL, and so using
a SQL application in CQL without modification is not a good idea. Besides,
I doubt any non-trivial SQL application could be used as is in CQL, due to
lack of join for instance.


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