[ https://issues.apache.org/jira/browse/CASSANDRA-17198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17468124#comment-17468124 ]
Kanthi Subramanian commented on CASSANDRA-17198: ------------------------------------------------ [~blerer] I removed the restrictions here, but the like query doesnt work as expected for example 'John%' doesnt work, any thoughts on where I should be looking into. I did add an index. [https://github.com/apache/cassandra/pull/1373/files] {code:java} // code placeholder cqlsh:tutorialspoint> select * from emp where emp_name like 'John Doe%' allow filtering; emp_id | date | emp_name --------+---------------+---------- 1 | 1564830182000 | John Doe(1 rows) cqlsh:tutorialspoint> select * from emp where emp_name like 'John%' allow filtering; emp_id | date | emp_name --------+------+---------- {code} > Allow to filter using LIKE predicates > ------------------------------------- > > Key: CASSANDRA-17198 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17198 > Project: Cassandra > Issue Type: Improvement > Components: CQL/Syntax > Reporter: Benjamin Lerer > Assignee: Kanthi Subramanian > Priority: Normal > Labels: AdventCalendar2021, lhf > Fix For: 4.x > > > {{LIKE}} predicates can only be used with the SASI indices. In several > usecases (e.g. querying the {{settings}} virtual table) it makes sense to > support them for filtering. > + Additional information for newcomers:+ > There are some checks in the {{StatementRestrictions}} constructor and on > {{LikeRestriction}} that need to be removed for allowing filtering using LIKE > on clustering and regular columns. > For filtering on partition columns the {{needFiltering}} methods in > {{PartitionKeySingleRestrictionSet}} will need to be modified to return true > when LIKE predicate are used. > The unit tests should go in {{SelectTest}}. -- This message was sent by Atlassian Jira (v8.20.1#820001) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org