skoppu22 commented on code in PR #183:
URL: 
https://github.com/apache/cassandra-analytics/pull/183#discussion_r2959402759


##########
cassandra-analytics-cdc-codec/src/main/java/org/apache/cassandra/cdc/avro/CdcEventUtils.java:
##########
@@ -281,14 +281,14 @@ public static GenericData.Record getTTLAvro(CdcEvent 
event, Schema ttlSchema)
         return ttlRecord;
     }
 
-    public static Map<String, Integer> getTTL(CdcEvent event)
+    public static Map<String, Long> getTTL(CdcEvent event)
     {
         CdcEvent.TimeToLive ttl = event.getTtl();
         if (ttl == null)
         {
             return null;
         }
-        return mapOf(AvroConstants.TTL_KEY, ttl.ttlInSec, 
AvroConstants.DELETED_AT_KEY, ttl.expirationTimeInSec);
+        return mapOf(AvroConstants.TTL_KEY, (long) ttl.ttlInSec, 
AvroConstants.DELETED_AT_KEY, ttl.expirationTimeInSec);

Review Comment:
   Here we are creating map, one entry as (TTL_KEY, TTL value as int), second 
entry (DELETED_AT_KEY, expirationTimeInSec value as long), so we have to take 
higher of int and long. Otherwise we need to return Map<String, Number> so 
Number can represent both int and long.



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