[
https://issues.apache.org/jira/browse/KUDU-1452?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15316918#comment-15316918
]
Will Berkeley commented on KUDU-1452:
-------------------------------------
Consider column X and the predicates P = 'X like %q%' and Q = '"a" < X < "b"'.
P * Q (P and Q) isn't a range predicate because "aq" and "aaq" match the
predicate, but "a" < "aaq" < "ab" < "aq" < "b" and "ab" does not match the
predicate. It's not a substring or suffix predicate (%val% or %val) because
there's always matching strings for such a predicate that don't lie in the
range, and it's not a prefix predicate (val%) because val would have to begin
with 'a'. "a" + any letter matches the predicate, so it'd have to be val = "a",
but that obviously doesn't work either. So P * Q is not a range or like
predicate.
Having AND/OR (+ NOT) later might be nice, but it'd have to be organized as
some kind of tree so people can do things like
{code}
(X like %ham% OR X > "waffles") AND (X like %eggs OR NOT X < "cheese")
{code}
with current predicates as leaves and AND/OR, etc as internal nodes, and the
merge function would rearrange + simplify the tree.
> Add predicate to allow scan based on COLUMN LIKE '%val%'
> --------------------------------------------------------
>
> Key: KUDU-1452
> URL: https://issues.apache.org/jira/browse/KUDU-1452
> Project: Kudu
> Issue Type: New Feature
> Components: api, client
> Reporter: Sameer Abhyankar
> Assignee: Sameer Abhyankar
>
> While working on a different issue, I noticed that Kudu currently has no way
> to fetch rows from a table based on the COLUMN LIKE '%value%' filter.
> Most relational DBs will allow lookups based on something like this:
> select c1, c2 from table-a where c3 like '%something%'
> I cant think of an efficient way to do this in Kudu, but I think it would
> still be more efficient than a client fetching all the rows and then doing
> the filtering.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)