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



##########
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java
##########
@@ -637,6 +737,28 @@ private void processElementForParDo(WindowedValue<InputT> 
elem) {
   }
 
   private void processElementForPairWithRestriction(WindowedValue<InputT> 
elem) {
+    currentElement = elem;
+    try {
+      currentRestriction = 
doFnInvoker.invokeGetInitialRestriction(processContext);
+      outputTo(
+          mainOutputConsumers,
+          (WindowedValue)
+              elem.withValue(
+                  KV.of(
+                      elem.getValue(),
+                      KV.of(
+                          currentRestriction,
+                          
doFnInvoker.invokeGetInitialWatermarkEstimatorState(processContext)))));
+    } finally {
+      currentElement = null;
+      currentRestriction = null;

Review comment:
       It is never set/utilized in these methods and just remains null. All 
output is produced using the entire set of windows for the current element 
instead.
   
   The window observing versions of these methods do set it and clear it.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to