cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-2737) CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
Date Mon, 22 Apr 2013 09:31:17 GMT


Sylvain Lebresne commented on CASSANDRA-2737:

Seems a bit more complicated that what I would I gone for a priori. It seems to me that what
we'd need for CREATE is:
# add a ifNotExist boolean to the existing statement.
# in validate, if the CF already exists, just skip throwing an exception. And in execute,
if the CF exists, skip the creation.

And the equivalent for DROP.

Doing this wouldn't allow the user to know if the creation did happen or if it was already
existing, but I think it's fair since you can always use the current statement (and catch
the exception) if you care about that. I suppose we could alternatively return a result set
with a boolean indicating if creation did happen, for convenience sake, but I'm not even sure
that'd be so useful.

But refactoring QueryProcessor and adding 2 new exceptions/new statements sounds overkill
to me.
> CQL: support IF EXISTS extension for DROP commands (table, keyspace, index)
> ---------------------------------------------------------------------------
>                 Key: CASSANDRA-2737
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>    Affects Versions: 0.8.0
>            Reporter: Cathy Daw
>            Priority: Trivial
>              Labels: cql
>             Fix For: 2.0
>         Attachments: 2737-concept-v1.txt

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message