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 2021/09/26 20:25:08 UTC

[GitHub] [beam] reuvenlax commented on a change in pull request #15465: [BEAM-12795] When using schemas, allow state/timers use without KV objects.

reuvenlax commented on a change in pull request #15465:
URL: https://github.com/apache/beam/pull/15465#discussion_r716256510



##########
File path: runners/direct-java/src/main/java/org/apache/beam/runners/direct/ParDoEvaluator.java
##########
@@ -100,7 +101,8 @@
               windowingStrategy,
               doFnSchemaInformation,
               sideInputMapping);
-      if (DoFnSignatures.signatureForDoFn(fn).usesState()) {
+      DoFnSignature signature = DoFnSignatures.signatureForDoFn(fn);
+      if (signature.usesState() || signature.onWindowExpiration() != null) {

Review comment:
       Yes, though it could also be separated. OnWindowExpiration didn't work if there were no state variables, which caused some of the tests I added to fail.




-- 
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: github-unsubscribe@beam.apache.org

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