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



##########
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:
       This will require calling the function everytime when it is null.
   You should use a boolean and update the check to be something like: 
`(currentArg != memoizedArg || !initialized)`.




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


Reply via email to