lukecwik commented on a change in pull request #15704:
URL: https://github.com/apache/beam/pull/15704#discussion_r727581454



##########
File path: 
sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java
##########
@@ -2438,6 +2438,62 @@ public void processElement(
       pipeline.run();
     }
 
+    @Test
+    @Category({
+      ValidatesRunner.class,
+      UsesStatefulParDo.class,
+      UsesMapState.class,
+      UsesTestStream.class
+    })
+    public void testMapStateNoReadOnReadableState() {
+      final String stateId = "foo";
+      final String countStateId = "count";
+
+      DoFn<KV<String, KV<String, Integer>>, KV<String, Integer>> fn =
+          new DoFn<KV<String, KV<String, Integer>>, KV<String, Integer>>() {
+
+            @StateId(stateId)
+            private final StateSpec<MapState<String, Integer>> mapState =
+                StateSpecs.map(StringUtf8Coder.of(), VarIntCoder.of());
+
+            @StateId(countStateId)
+            private final StateSpec<CombiningState<Integer, int[], Integer>> 
countState =
+                StateSpecs.combiningFromInputInternal(VarIntCoder.of(), 
Sum.ofIntegers());

Review comment:
       Is coder inference broken if we rely on `StateSpec#combining`?




-- 
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]


Reply via email to