cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CASSANDRA-11954) Generalize SASI indexes
Date Tue, 07 Jun 2016 15:43:21 GMT

    [ https://issues.apache.org/jira/browse/CASSANDRA-11954?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15318705#comment-15318705
] 

Sylvain Lebresne commented on CASSANDRA-11954:
----------------------------------------------

You're only talking about refactoring the SASI code slightly so it's easier for other implementations
to reuse some of the parts right? If so, assuming said refactoring make sense and don't have
particular drawbacks, I don't have any problem with that.

> Generalize SASI indexes
> -----------------------
>
>                 Key: CASSANDRA-11954
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11954
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Local Write-Read Paths, sasi
>            Reporter: Andrés de la Peña
>            Priority: Minor
>              Labels: 2i, sasi, secondary_index
>             Fix For: 3.x
>
>
> It would be great to independize SASI indexes from their underlying index structure and
query syntax. This way it would be easy to create new custom SSTable attached index implementations
for specific use cases. 
> The API could consist on two of interfaces, one for on-memory indexes and other for on-disk
indexes, implemented by users and invoked by Cassandra when there are row writes, SSTable
flushes, compactions, etc.
> As an example, the API could be used to build an efficient SASI geospatial index based
on R-trees:
> {code}
> CREATE TABLE locations (
>     id text,
>     date timeuuid,
>     location tuple<double, double>,
>     PRIMARY KEY (id, date)
> );
> CREATE CUSTOM INDEX idx ON locations () USING '...' WITH OPTIONS = {...};
> INSERT INTO locations (id, date, location) VALUES ('alice', now(), (-0.18676, 51.66870));
> SELECT * FROM locations WHERE expr(idx, 'POLYGON((-0.25 51.76, -0.25 51.54, -0.027 51.65,
-0.25 51.76))');
> {code}
> Also, custom SASI indexes predicates could be combined with regular SASI indexes predicates
in the same query, which would be very nice.
> What do you think? Does it make any sense?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message