Yes, to unblock this I thing we can go with this approach, basically the schema
becomes this:
```
@PublicEvolving
public interface KeyedDeserializationSchema<T> extends Serializable,
ResultTypeQueryable<T> {
@Deprecated
default T deserialize(byte[] messageKey, byte[] message, String topic,
int partition, long offset) {
throw new RuntimeException("blammo");
}
default T deserialize(byte[] messageKey, byte[] message, String topic,
int partition, long offset, long timestamp) {
return deserialize(/* call the other method */);
}
boolean isEndOfStream(T nextElement);
}
```
With this, if you have an existing implementation of
`KeyedDeserializationSchema` it will continue to work without any changes. If
you implement a new one you have to implement one of the methods, otherwise the
exception is thrown. And all Flink code only calls the version that takes the
timestamp.
What do you think?
[ Full content available at: https://github.com/apache/flink/pull/6105 ]
This message was relayed via gitbox.apache.org for [email protected]