robertwb commented on a change in pull request #16354:
URL: https://github.com/apache/beam/pull/16354#discussion_r776851490



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/join/CoGbkResult.java
##########
@@ -98,8 +104,7 @@ public CoGbkResult(
         throw new IllegalStateException(
             "union tag " + unionTag + " has no corresponding tuple tag in the 
result schema");
       }
-      List<Object> valueList = (List<Object>) valueMap.get(unionTag);
-      valueList.add(value.getValue());
+      valuesByTag.get(unionTag).add(value.getValue());
     }
 
     if (taggedIter.hasNext()) {

Review comment:
       There are pros and cons to this, but I agree it's a slight improvement. 
Done.




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