steveniemitz commented on code in PR #17802:
URL: https://github.com/apache/beam/pull/17802#discussion_r895823682


##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/util/common/worker/ByteArrayShufflePosition.java:
##########
@@ -58,15 +65,15 @@ public static byte[] getPosition(@Nullable ShufflePosition 
shufflePosition) {
     }
     Preconditions.checkArgument(shufflePosition instanceof 
ByteArrayShufflePosition);
     ByteArrayShufflePosition adapter = (ByteArrayShufflePosition) 
shufflePosition;
-    return adapter.getPosition();
+    return adapter.getPosition().toByteArray();

Review Comment:
   I decided to leave this as-is, it's used in a couple places 
(ChunkingShuffleBatchReader) and having the `toByteArray` call is useful to 
avoid another null check outside at the call site.



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