[
https://issues.apache.org/jira/browse/CASSANDRA-5576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13684073#comment-13684073
]
Aleksey Yeschenko commented on CASSANDRA-5576:
----------------------------------------------
Yes, options should definitely be a map<text, text>. Question is, should class
be a separate column or should it be simply one of the options in that map.
Cases where class is part of the options and not a separate column:
- custom 2i (schema_columns.index_options)
- compression (schema_columnfamilies.compression_parameters)
Cases where class is a separate column:
- replication (schema_keyspaces.strategy_class)
- compaction (schema_columnfamilies.compaction_strategy_class)
In the last two cases, even though they are stored separately, in CQL3
CREATE/ALTER the class is still conceptually part of the options map:
- CREATE KEYSPACE <name> WITH replication = {'class': 'path.to.strategy.class',
'option1': 'value1', 'optionX': ...}
- ALTER TABLE <name> WITH compaction = {'class':
'SizeTieredCompactionStrategy', 'option1': 'value1', 'optionX': ...}
Now, once we add parameters support to triggers, we could just add
trigger_options map<text, text> and to keep all but class there. Adding columns
to system tables is okay, dropping them isn't. But adding trigger_options
map<text,text> right now and storing the class there (with 'class' key) will
let us to leave schema_triggers schema like this forever, future-proofing it
(this is what I suggested in
https://issues.apache.org/jira/browse/CASSANDRA-5576?focusedCommentId=13681562&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13681562
and in
https://issues.apache.org/jira/browse/CASSANDRA-5576?focusedCommentId=13669381&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13669381
before that).
> 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