davidradl commented on code in PR #26651: URL: https://github.com/apache/flink/pull/26651#discussion_r2137625070
########## flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/HeapListState.java: ########## @@ -142,6 +145,34 @@ public byte[] getSerializedValue( return baos.toByteArray(); } + public List<V> migrateValueForTtlStateMigration( + List<V> state, + TypeSerializer<List<V>> priorSerializer, + TypeSerializer<List<V>> newSerializer, + TtlTimeProvider ttlTimeProvider) { + + Preconditions.checkArgument( Review Comment: it looks like there is suplication of code, can we re arrange the code so the following is not repeated for the different cases ``` priorSerializer instanceof TtlAwareSerializer.TtlAwareListSerializer); Preconditions.checkArgument( newSerializer instanceof TtlAwareSerializer.TtlAwareListSerializer); TtlAwareSerializer<V, ?> priorTtlAwareElementSerializer = ((TtlAwareSerializer.TtlAwareListSerializer<V>) priorSerializer) .getElementSerializer(); TtlAwareSerializer<V, ?> newTtlAwareElementSerializer = ((TtlAwareSerializer.TtlAwareListSerializer<V>) newSerializer) .getElementSerializer(); ``` -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org