blerer commented on code in PR #2668:
URL: https://github.com/apache/cassandra/pull/2668#discussion_r1598057666


##########
src/java/org/apache/cassandra/transport/messages/ExecuteMessage.java:
##########
@@ -135,20 +134,16 @@ protected Message.Response execute(QueryState state, long 
queryStartNanoTime, bo
             if (prepared == null)
                 throw new PreparedQueryNotFoundException(statementId);
 
-            if (!prepared.fullyQualified
-                && !Objects.equals(state.getClientState().getRawKeyspace(), 
prepared.keyspace)
-                // We can not reliably detect inconsistencies for batches yet
-                && !(prepared.statement instanceof BatchStatement)
-            )
+            if (!prepared.fullyQualified && 
prepared.statement.eligibleAsPreparedStatement() && 
!Objects.equals(state.getClientState().getRawKeyspace(), prepared.keyspace))

Review Comment:
   Nit: I would add a comment to explain the logic as the last part is not 
obvious.



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