vcrfxia commented on code in PR #13496: URL: https://github.com/apache/kafka/pull/13496#discussion_r1158943426
########## streams/src/main/java/org/apache/kafka/streams/kstream/internals/KTableValueGetter.java: ########## @@ -25,5 +25,21 @@ ValueAndTimestamp<V> get(K key); + /** + * Returns the latest record version, associated with the provided key, with timestamp + * not exceeding the provided timestamp bound. This method may only be called if + * {@link #isVersioned()} is true. + */ + default ValueAndTimestamp<V> get(K key, long asOfTimestamp) { + throw new UnsupportedOperationException("get(key, timestamp) is only supported for versioned stores"); + } + + /** + * @return whether this value getter supports multiple record versions for the same key. + * If true, then {@link #get(Object, long)} must be implemented. If not, then + * {@link #get(Object, long)} must not be called. + */ + boolean isVersioned(); Review Comment: Sure, I was on the fence about this. The benefit of not having a default value is that it forces all new implementations to think about whether versioning can/should be supported, but I'm not too worried since it's an internal interface. If you prefer having the default, I will make the update. -- 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: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org