smiklosovic commented on code in PR #4596:
URL: https://github.com/apache/cassandra/pull/4596#discussion_r2752216939


##########
src/java/org/apache/cassandra/cql3/QueryProcessor.java:
##########
@@ -495,6 +506,11 @@ public static Prepared parseAndPrepare(String query, 
ClientState clientState, bo
         CQLStatement statement = raw.prepare(clientState);
         statement.validate(clientState);
 
+        if (!isInternal && !clientState.isInternal)

Review Comment:
   It also means that if we do not put it into "validate" method for each 
respective statement then calling "validate" itself would pass but in fact it 
would contain mis prepared statement. I do not think that is a good way do 
that. By putting that logic to validate method, we are centralizing it all 
which is better design and the logic does not "leak" outside of it. 



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