alanwang67 commented on code in PR #4879:
URL: https://github.com/apache/cassandra/pull/4879#discussion_r3417282375


##########
src/java/org/apache/cassandra/cql3/transactions/ConditionStatement.java:
##########
@@ -40,8 +40,14 @@ public enum Kind
         GT(TxnCondition.Kind.GREATER_THAN, TxnCondition.Kind.LESS_THAN),
         GTE(TxnCondition.Kind.GREATER_THAN_OR_EQUAL, 
TxnCondition.Kind.LESS_THAN_OR_EQUAL),
         LT(TxnCondition.Kind.LESS_THAN, TxnCondition.Kind.GREATER_THAN),
-        LTE(TxnCondition.Kind.LESS_THAN_OR_EQUAL, 
TxnCondition.Kind.GREATER_THAN_OR_EQUAL);
-        
+        LTE(TxnCondition.Kind.LESS_THAN_OR_EQUAL, 
TxnCondition.Kind.GREATER_THAN_OR_EQUAL),

Review Comment:
   Discussed offline, leaving here as documentation. This was done in order to 
allow for node upgrade compatibility. Since we decide which serializer to use 
based off the operator and `ref op val` and `ref op ref`, can not be 
differentiated by just the operator, the thinking was to create a new operator 
to differentiate the two. However, this resulted in duplicate code. The 
implementation now chooses to encode this information by using an extra bit 
within the `TxnCondition.Kind` ordinal that is serialized. 



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