boyuanzz commented on a change in pull request #12724:
URL: https://github.com/apache/beam/pull/12724#discussion_r480296260
##########
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:
`windowedSplitResult` can be null and it has been checked above
https://github.com/apache/beam/blob/master/sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java#L1579-L1588.
I'm working on a refactor https://github.com/apache/beam/pull/12710, which
will provide much more test coverage. Sorry for the inconvenience.
----------------------------------------------------------------
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:
[email protected]