bereng commented on code in PR #3095:
URL: https://github.com/apache/cassandra/pull/3095#discussion_r1584318318


##########
src/java/org/apache/cassandra/cql3/Operator.java:
##########
@@ -359,20 +723,43 @@ public boolean isIN()
     }
 
     /**
-     * Checks if this operator is CONTAINS operator.
-     * @return {@code true} if this operator is a CONTAINS operator, {@code 
false} otherwise.
+     * Reverse this operator.
+     * @return the reverse operator from this operator.
+     */
+    public Operator negate()
+    {
+        throw new UnsupportedOperationException(this + " does not support 
negation");
+    }
+
+    /**
+     * Some operators are not supported by the read path because we never 
fully implemented support for them.
+     * It is the case for {@code IS_NOT} and {@code !=}
+     * @return {@code true} for the operators supported by the read path, 
{@code false} otherwise.
+     */
+    protected boolean isSupportedByReadPath()
+    {
+        return true;
+    }
+
+    /**
+     * The "LIKE_" operators are not real CQL operators and are simply a hack 
that should be removed at some point.
+     * Therefore, we want to ignore them for some operations.
+     * @return {@code true} for the "LIKE_" operators
      */
-    public boolean isContains()
+    private boolean isLikeXxx()
     {
-        return this == CONTAINS;
+        return name().startsWith("LIKE_");

Review Comment:
   As per conversation in Slack Benjamin is referring to the conceptual link 
between them. Whereas I am referring to the practicality of not having 
hardcoded magical values in the code. I can see both arguments, I'll favor 
authorship.



-- 
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]

Reply via email to