[
https://issues.apache.org/jira/browse/CASSANDRA-11067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15115501#comment-15115501
]
Jack Krupansky commented on CASSANDRA-11067:
--------------------------------------------
How about a severely restricted LIKE that only permits patterns ending with a
"%" for prefix query (LIKE 'J%') or with a "%" at either end for contains (LIKE
'%abc%') or ending with a % for suffix query (LIKE '%smith')? Then it would be
fully compatible with SQL.
In any case, "=" would then attempt an exact match using the SASI index? That
would allow both exact and inexact matching for each column using a single
index.
If we can't have this restricted LIKE, descriptive keyword operators like
SUFFIX and PREFIX would seem desirable. Could the existing CONTAINS operator
also be used? They would also handle the case where the prefix/suffix/contains
string is a parameter - otherwise the user has to do a messy concat.
> Improve SASI syntax
> -------------------
>
> Key: CASSANDRA-11067
> URL: https://issues.apache.org/jira/browse/CASSANDRA-11067
> Project: Cassandra
> Issue Type: Task
> Components: CQL
> Reporter: Jonathan Ellis
> Assignee: Sam Tunnicliffe
>
> I think everyone agrees that a LIKE operator would be ideal, but that's
> probably not in scope for an initial 3.4 release.
> Still, I'm uncomfortable with the initial approach of overloading = to mean
> "satisfies index expression." The problem is that it will be very difficult
> to back out of this behavior once people are using it.
> I propose adding a new operator in the interim instead. Call it MATCHES,
> maybe. With the exact same behavior that SASI currently exposes, just with a
> separate operator rather than being rolled into =.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)