scwhittle commented on code in PR #41593:
URL: https://github.com/apache/beam/pull/41593#discussion_r4752574872


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/util/BundleLifter.java:
##########
@@ -239,9 +239,10 @@ public void processElement(
     }
 
     @FinishBundle

Review Comment:
   let's do this in a separate PR



##########
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java:
##########
@@ -993,8 +993,12 @@ public interface MultiOutputReceiver {
    *       commits the output of this bundle. See <a
    *       href="https://s.apache.org/beam-finalizing-bundles";>Apache Beam 
Portability API: How to
    *       Finalize Bundles</a> for further details.
-   *   <li>TODO(https://github.com/apache/beam/issues/18203): Add support for 
an {@link
-   *       OutputReceiver} and {@link MultiOutputReceiver} that can output to 
a window.
+   *   <li>If one of the parameters is of type {@link OutputReceiver} 
(parameterized with {@code
+   *       OutputT} or {@link Row} when the output has a schema) or {@link 
MultiOutputReceiver},
+   *       then it can be used to emit elements from {@link FinishBundle 
@FinishBundle}. Because
+   *       {@link FinishBundle @FinishBundle} is not associated with a single 
input element, callers
+   *       must explicitly provide the timestamp, window(s), and {@link 
PaneInfo} (for example, via
+   *       {@link OutputReceiver#outputWindowedValue} or {@link 
OutputReceiver#builder}).

Review Comment:
   * Not doing so will result in a Runtime error.
   
   Though could we expose a more restrictive OutputReciever interface that is 
just the methods with full context? Then we could rely on type-safety instead 
of comment+runtime exception
   



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to