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-2355) Allow parameters for comparator
Date Fri, 08 Apr 2011 22:08:06 GMT

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

Sylvain Lebresne commented on CASSANDRA-2355:
---------------------------------------------

bq. Are there any other uses for comparator options?

The idea was to allow reversed comparator, and the composite types and more importantly both
those together. In particular this improves slightly I believe the parsing for the composite
types themselves. The fact that it is generic also makes use usable for custom comparator.
There was also some idea of generalizing existing comparator hinted in the comment above.
But for exemple, we could easily have a TextComparator(charset='whatever'), which could be
cool. Or a TextComparator(regexp='...') who would validate only entry matching some regexp.
Maybe that last one is not so useful, I don't know, but I do believe that it opens a bunch
of interesting possibility. 

> Allow parameters for comparator
> -------------------------------
>
>                 Key: CASSANDRA-2355
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2355
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Sylvain Lebresne
>            Assignee: Sylvain Lebresne
>            Priority: Minor
>             Fix For: 0.8
>
>         Attachments: Allow-comparators-to-take-arguments-ReversedType.patch
>
>   Original Estimate: 4h
>  Remaining Estimate: 4h
>
> Being able to provide arguments to a comparator, to parametrize its behavior, can be
useful.
> For example, a generic ReverseComparator is trivial to write, but without the ability
to provide arguments at the comparator constriction, it cannot be used.
> CASSANDRA-2231 provides another use case for this.
> This ticket proposes to introduce a parser for comparator definition that supports optional
parameters and to introduce a generic ReverseType as a simple example of this.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message