adelapena commented on code in PR #1891:
URL: https://github.com/apache/cassandra/pull/1891#discussion_r1107263644


##########
src/java/org/apache/cassandra/cql3/QueryOptions.java:
##########
@@ -630,7 +640,10 @@ public void encode(QueryOptions options, ByteBuf dest, 
ProtocolVersion version)
             if (flags.contains(Flag.KEYSPACE))
                 CBUtil.writeAsciiString(options.getSpecificOptions().keyspace, 
dest);
             if (flags.contains(Flag.NOW_IN_SECONDS))
-                dest.writeInt(options.getSpecificOptions().nowInSeconds);
+            {
+                long nis = options.getSpecificOptions().nowInSeconds == 
UNSET_NOWINSEC ? UNSET_NOWINSEC_GUAVA_UINT : 
options.getSpecificOptions().nowInSeconds;
+                dest.writeInt(UnsignedInteger.valueOf(nis).intValue());

Review Comment:
   ```suggestion
                   long nowInSeconds = 
options.getSpecificOptions().nowInSeconds == UNSET_NOWINSEC
                                       ? UNSET_NOWINSEC_GUAVA_UINT :
                                       
options.getSpecificOptions().nowInSeconds;
                   
dest.writeInt(UnsignedInteger.valueOf(nowInSeconds).intValue());
   ```



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