cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aleksey Yeschenko (JIRA)" <>
Subject [jira] [Commented] (CASSANDRA-5576) CREATE/DROP TRIGGER in CQL
Date Sat, 15 Jun 2013 07:31:22 GMT


Aleksey Yeschenko commented on CASSANDRA-5576:

Thanks! Everything looks good except some 1-line-fixable things and thrift/cli issue:
- DropTriggerStatement.checkAccess() should check for ALTER - we are altering a table here,
not dropping it
- DropTriggerStatement.changeType() should return UPDATED, for the same reason
- in Cql.g should probably add K_TRIGGER to unreserved_function_keyword to not break people's
queries if they have a column named 'trigger' somewhere. The less reserved keywords we got,
the better
- (nit) in CFMetaData, SchemaTriggerCf = compile(5, ...) - there is no need for oldCfId argument
here (5), since the table has never existed in 1.1
- (nit) CFMetaData.getTriggerClass() should be renamed to CFMetaData.getTriggerClasses() -
it returns a collection, after all

Thrift/cli issue:
43: optional list<map<string, string>> triggers,
Is not future-parametrization proof.

Also, cli syntax is using json, instead of using arrayConstruct from Cli.g (with nested hashConstruct).
The former requires json where there shouldn't be, and quotes around key names (and quotes
around the whole thing), which it shouldn't.

*HOWEVER* I suggest not fixing it at all and removing triggers entirely from CLI and thrift
APIs. CLI is deprecated. And with Thrift you won't be able to add/remove triggers from CQL3
tables, anyway, because you can't even see them. With CQL3 CREATE TRIGGER/DROP TRIGGER, however,
you can modify both CQL3 and old-style tables, easily. So let's just rely on them/cqlsh for
modifying triggers.

I'm open to debate about thirft/cli here. But if we are going to support trigger modification
from cli/thrift, it'll be done right, and I can't justify wasting any more of your time on
> --------------------------
>                 Key: CASSANDRA-5576
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Vijay
>             Fix For: 2.0

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