You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/08/31 17:57:52 UTC

[GitHub] [beam] ibzib commented on a change in pull request #12724: Only encoding element residual when it's not null.

ibzib commented on a change in pull request #12724:
URL: https://github.com/apache/beam/pull/12724#discussion_r480291609



##########
File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java
##########
@@ -1642,43 +1642,45 @@ public Object restriction() {
               .build());
     }
 
-    ByteString.Output primaryBytes = ByteString.newOutput();
-    ByteString.Output residualBytes = ByteString.newOutput();
-    try {
-      fullInputCoder.encode(windowedSplitResult.getPrimarySplitRoot(), primaryBytes);
-      fullInputCoder.encode(windowedSplitResult.getResidualSplitRoot(), residualBytes);
-    } catch (IOException e) {
-      throw new RuntimeException(e);
+    if (windowedSplitResult.getResidualSplitRoot() != null) {

Review comment:
       Can't `windowedSplitResult` itself be null here?




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org