diff --git a/metadata-io/src/main/java/com/linkedin/metadata/entity/cassandra/CassandraRetentionService.java b/metadata-io/src/main/java/com/linkedin/metadata/entity/cassandra/CassandraRetentionService.java index 91e31975298771..bc6ee6ddd5026f 100644 --- a/metadata-io/src/main/java/com/linkedin/metadata/entity/cassandra/CassandraRetentionService.java +++ b/metadata-io/src/main/java/com/linkedin/metadata/entity/cassandra/CassandraRetentionService.java @@ -195,7 +195,7 @@ private void applyTimeBasedRetention( @Nonnull final Urn urn, @Nonnull final String aspectName, @Nonnull final TimeBasedRetention retention) { - Timestamp threshold = new Timestamp(_clock.millis() - retention.getMaxAgeInSeconds() * 1000); + Timestamp threshold = new Timestamp(_clock.millis() - retention.getMaxAgeInSeconds() * 1000L); SimpleStatement ss = deleteFrom(CassandraAspect.TABLE_NAME) .whereColumn(CassandraAspect.URN_COLUMN) diff --git a/metadata-io/src/main/java/com/linkedin/metadata/entity/ebean/EbeanRetentionService.java b/metadata-io/src/main/java/com/linkedin/metadata/entity/ebean/EbeanRetentionService.java index 250a81d9c8edcf..77752153aad47e 100644 --- a/metadata-io/src/main/java/com/linkedin/metadata/entity/ebean/EbeanRetentionService.java +++ b/metadata-io/src/main/java/com/linkedin/metadata/entity/ebean/EbeanRetentionService.java @@ -156,7 +156,7 @@ private Expression getTimeBasedRetentionQuery(@Nonnull final TimeBasedRetention return new SimpleExpression( EbeanAspectV2.CREATED_ON_COLUMN, Op.LT, - new Timestamp(_clock.millis() - retention.getMaxAgeInSeconds() * 1000)); + new Timestamp(_clock.millis() - retention.getMaxAgeInSeconds() * 1000L)); } private void applyRetention(