[ https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13673552#comment-13673552
]
Aleksey Yeschenko commented on CASSANDRA-5576:
----------------------------------------------
Was there an issue with any of the suggestions in https://issues.apache.org/jira/browse/CASSANDRA-5576?focusedCommentId=13669381&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13669381?
CQL is part of public API, we *try* not to change it too often, and to keep it consistent.
One issue with
{noformat}
CREATE TRIGGER index_logger ON "Keyspace1"."Standard1" EXECUTE ('org.apache.cassandra.triggers.InvertedIndex',
'org.apache.cassandra.triggers.LogColumnUpdates');
{noformat}
Is that it closes the door to future parametrization of trigger classes (which is not planned
for 2.0, but will probably happen eventually). Another is that I just see no value in being
able to bundle several trigger classes under one name - what exactly does it buy us?
So, ideally, I'd rather see
{noformat}
CREATE TRIGGER indexer ON "Keyspace1"."Standard1" WITH options = {'class': 'org.apache.cassandra.triggers.InvertedIndex'}
{noformat}
(Use map syntax, even if we are only going to support one option - 'class', for now. You can
look at CREATE CUSTOM INDEX implementation to see what exactly I mean).
We also *don't* want to serialize anything as JSON in schema columns anymore (this is what
CASSANDRA-5578 was about). The original plan was to use a set<text> field for the triggers,
but now that we can attach names to them, and potentially want to be able to parametrize them,
neither a set<text> or a map<text, text> will do. So we need a separate schema-table
- I listed one example schema in the comment before this one.
> CREATE/DROP TRIGGER in CQL
> --------------------------
>
> Key: CASSANDRA-5576
> URL: https://issues.apache.org/jira/browse/CASSANDRA-5576
> 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: http://www.atlassian.com/software/jira
|