You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by "kennknowles (via GitHub)" <gi...@apache.org> on 2025/06/03 15:43:35 UTC

Re: [PR] Feedback requested: introduce OutputBuilder in Java SDK [beam]

kennknowles commented on code in PR #34902:
URL: https://github.com/apache/beam/pull/34902#discussion_r2124287874


##########
sdks/java/core/src/main/java/org/apache/beam/sdk/util/construction/SplittableParDoNaiveBounded.java:
##########
@@ -524,22 +526,15 @@ public String timerId(DoFn<InputT, OutputT> doFn) {
       public OutputReceiver<OutputT> outputReceiver(DoFn<InputT, OutputT> doFn) {
         return new OutputReceiver<OutputT>() {
           @Override
-          public void output(OutputT output) {
-            outerContext.output(output);
-          }
-
-          @Override
-          public void outputWithTimestamp(OutputT output, Instant timestamp) {
-            outerContext.outputWithTimestamp(output, timestamp);
-          }
-
-          @Override
-          public void outputWindowedValue(
-              OutputT output,
-              Instant timestamp,
-              Collection<? extends BoundedWindow> windows,
-              PaneInfo paneInfo) {
-            outerContext.outputWindowedValue(output, timestamp, windows, paneInfo);
+          public OutputBuilder<OutputT> builder(OutputT value) {
+            return WindowedValue.<OutputT>builder(
+                    outputBuilder ->
+                        outerContext.outputWindowedValue(

Review Comment:
   Noting that the underlyiing ProcessContext (or other Context) does not benefit from the OutputBuilder pattern and needs to propagate metadata, either by refactor or just brute force.



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