[
https://issues.apache.org/jira/browse/CASSANDRA-3782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13193179#comment-13193179
]
Sylvain Lebresne commented on CASSANDRA-3782:
---------------------------------------------
For the syntax, let's consider a typical dynamic CF in CQL 3.0:
{noformat}
CREATE TABLE timeline (
key int,
time timestamp,
event text,
PRIMARY KEY (key, time)
) WITH COMPACT STORAGE
{noformat}
then a syntax to declare an index could look like:
{noformat}
CREATE INDEX index_name ON timeline WHERE time = 0;
{noformat}
Alternatively, we could have it be:
{noformat}
CREATE INDEX index_name ON timeline(0);
{noformat}
but I feel that will be less intuitive.
There is obviously a lot of possible variation. Maybe it could be worth keeping
CASSANDRA-3680 in mind too for this.
> Secondary indexes support for wide rows in CQL 3.0
> --------------------------------------------------
>
> Key: CASSANDRA-3782
> URL: https://issues.apache.org/jira/browse/CASSANDRA-3782
> Project: Cassandra
> Issue Type: Sub-task
> Components: API
> Reporter: Sylvain Lebresne
> Assignee: Sylvain Lebresne
> Fix For: 1.1
>
>
> Currently, CQL 3.0 doesn't allow creating an index on a dynamic CF (with
> COMPACT STORAGE). The goal of this ticket is *not* to support the composite
> case however (CASSANDRA-3680 will tackle this).
> I think changes needed to support this are only in the CQL side and covert
> two area:
> * Finding a syntax for it
> * Currently, the CQL 3 code consider that a CF with any column_metadata
> defined is a non-compact cf. Basically the problem is that we currently use
> column_metadata both for defining a name for a column in the static case, and
> store indexing information. Ideally, we would separate those informations,
> i.e. we could add a new map valueAliases (ByteBuffer -> AbstractType) to
> CFMetadata (only used by static CF) and we would keep column_metadata for
> indexing purpose only. However that may be problematic for backward
> compatibility (with thrift in particular), so probably instead we can just
> add a new boolean isStaticColumnName to ColumnDefinition.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira