maedhroz commented on code in PR #4290:
URL: https://github.com/apache/cassandra/pull/4290#discussion_r2264367979
##########
src/java/org/apache/cassandra/cql3/restrictions/StatementRestrictions.java:
##########
@@ -206,11 +206,20 @@ public StatementRestrictions(ClientState state,
else if (operator.requiresIndexing())
{
Restriction restriction = relation.toRestriction(table,
boundNames);
-
- if (!type.allowUseOfSecondaryIndices() ||
!restriction.hasSupportingIndex(indexRegistry))
+
+ if (!type.allowUseOfSecondaryIndices())
throw invalidRequest("%s restriction is only supported on
properly " +
"indexed columns. %s
is not valid.", operator, relation);
+ if (operator != Operator.LIKE)
+ {
+ // LIKE can be used as post index query filter, but not as
index restriction
+ if (!restriction.hasSupportingIndex(indexRegistry))
+ throw invalidRequest("%s restriction is only supported
on properly " +
+ "indexed columns. %s
is not valid.", operator, relation);
+ }
Review Comment:
I'm guessing this has been changed already in your not-yet-pushed work, but
once LIKE doesn't return `true` from `requiresIndexing()`, seems like this
change should no longer be necessary.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]