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/06/18 16:07:39 UTC

[GitHub] [beam] y1chi commented on a change in pull request #12029: [BEAM-10153] Fix VoidCoder with FnApiDoFnRunner

y1chi commented on a change in pull request #12029:
URL: https://github.com/apache/beam/pull/12029#discussion_r442339948



##########
File path: sdks/java/harness/src/main/java/org/apache/beam/fn/harness/state/FnApiStateAccessor.java
##########
@@ -128,7 +128,7 @@ public FnApiStateAccessor(
       @Override
       public ResultT get() {
         ArgT currentArg = arg.get();
-        if (currentArg != memoizedArg) {
+        if (currentArg != memoizedArg || currentArg == null) {

Review comment:
       For VoidCoder the arg.get() returns null, which means the currentArg != memoizedArg will evaluate to false. 
   This leaves the memoizedResult to null(underneath function never applied), and for VoidCoder key coder we need to set the key to ByteString.EMPTY instead of null(generated proto class doesn't allow setting to null) I believe.




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