dawidwys commented on code in PR #21201:
URL: https://github.com/apache/flink/pull/21201#discussion_r1013750183
##########
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/InternalTimersSnapshotReaderWriters.java:
##########
@@ -223,10 +167,10 @@ public static <K, N> InternalTimersSnapshotReader<K, N>
getReaderForVersion(
switch (version) {
case NO_VERSION:
- return new
InternalTimersSnapshotReaderPreVersioned<>(userCodeClassLoader);
-
case 1:
- return new
InternalTimersSnapshotReaderV1<>(userCodeClassLoader);
+ throw new UnsupportedOperationException(
Review Comment:
I don't have strong opinion here, so we can go with either.
My preference is for `IllegalStateException` because
1. It is consistent with the `default` branch
2. I see `UnsupportedOperationException` rather to be thrown in some
stubs/mocks that have limited functionality and I see it more likely to be
supported at some point. This case is not a limited functionality, but a wrong
state/argument(savepoint) that has been passed.
Still, I want to emphasize I am good with either.
--
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]