Copilot commented on code in PR #29571:
URL: https://github.com/apache/flink/pull/29571#discussion_r4353867656
##########
flink-runtime/src/test/java/org/apache/flink/runtime/state/v2/AsyncKeyedStateBackendAdaptorTest.java:
##########
@@ -243,6 +253,139 @@ public void testMapStateAdaptor() throws Exception {
adaptor.close();
}
+ @Test
+ public void testMapStateNullRemovals() throws Exception {
+ CheckpointableKeyedStateBackend<String> backend = createBackend();
+ try (AsyncKeyedStateBackendAdaptor<String> adaptor =
+ new AsyncKeyedStateBackendAdaptor<>(backend)) {
+ backend.setCurrentKey("test");
+ MapState<Integer, Integer> state =
+ adaptor.getOrCreateKeyedState(
+ VoidNamespace.INSTANCE,
+ VoidNamespaceSerializer.INSTANCE,
+ new MapStateDescriptor<>(
+ "nullRemovals",
+ BasicTypeInfo.INT_TYPE_INFO,
+ BasicTypeInfo.INT_TYPE_INFO));
+ assertMapStateNullRemovals(state);
+ } finally {
+ backend.dispose();
+ }
+ }
+
+ @Test
+ public void testAsyncMapStateMutationExceptions() {
+ IOException failure = new IOException("delegate failure");
+ List<String> calls = new ArrayList<>();
+ @SuppressWarnings("unchecked")
Review Comment:
The repository guidelines prohibit adding `@SuppressWarnings`. This proxy
introduces one for its unchecked generic cast. As a non-blocking cleanup,
define a nested, non-generic interface extending `InternalMapState<Integer,
VoidNamespace, Integer, Integer>`, use that interface in the proxy's interface
array, and cast to it. This removes the unchecked cast and suppression while
preserving the call-recording and exception assertions.
--
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]