You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/03/10 21:05:20 UTC

[GitHub] [cassandra] thingtwin1 commented on a change in pull request #1453: added enable for ALLOW FILTERING property

thingtwin1 commented on a change in pull request #1453:
URL: https://github.com/apache/cassandra/pull/1453#discussion_r824155676



##########
File path: src/java/org/apache/cassandra/cql3/statements/SelectStatement.java
##########
@@ -231,7 +233,8 @@ public void authorize(ClientState state) throws InvalidRequestException, Unautho
 
     public void validate(ClientState state) throws InvalidRequestException
     {
-        // Nothing to do, all validation has been done by RawStatement.prepare()
+        if (parameters.allowFiltering && !SchemaConstants.isSystemKeyspace(table.keyspace))

Review comment:
       `prepare` and `validate` are both called one after the other [here](https://github.com/apache/cassandra/blob/f0c97132c969cc8dd028d00c5e68ada8b0b9b9c6/src/java/org/apache/cassandra/cql3/QueryProcessor.java#L420). I put the logic in validate since it would also be called when deciding if the query should run.  The logic can be placed in either function though. 




-- 
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: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org